Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP How to Build a WordPress Theme WordPress Theme Functions The WordPress Loop

Jonah Shi
Jonah Shi
10,140 Points

the "home" title and "content" do not show on homepage after I add the code to front-page.php

```<?php get_header();?>

<P>This is the front-page.php</P> <?php if (have_pages()) : while (have_pages()) : the_page(); ?> <h3><?php the_title(); ?></h3> <?php the_content();?> <hr /> <?php endwhile;else: ?> <p> There are no posts or pages here</p> <?php endif; ?>

<?php get_footer();?>```

it shows all the posts when I write

```<?php get_header();?>

<P>This is the front-page.php</P> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <h3><?php the_title(); ?></h3> <?php the_content();?> <hr /> <?php endwhile;else: ?> <p> There are no posts or pages here</p> <?php endif; ?>

1 Answer

Jonah Shi
Jonah Shi
10,140 Points

Problem solved, need to change "settings"-"reading" as well