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

WordPress The WordPress Template Hierarchy Page and Post Templates in WordPress Single Post and Post Format Templates

A "static" blog page: isn't it a contradiction?

At the beginning of this video, the instructor selects the blog page using the home.php template as a "static" front-page. I don't understand why he didn't select the "Your latest posts" option (or what is that option for, exactly).

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

A static blog page is simply a page that is selected to be controlled by the home.php template. And it's that home.php template that controls the "Blog posts" option.

WordPress knows which version of the template you want but either the Static Front Page or the blog index page is controlled by home.php.

Thanks for your answer, but I still don't get why don't we select the option "Front page displays: Your latest posts" in order to display the blog page as front page.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

That is prescisely what you do.

If you want you front page to be a blog index page you can do that; select front page to be But on the website I'm building for my website, I have a static page I have set aside go be my blog..

To visualise this, you can look at a great visual resource called http://wphierarchy.com, This will show you a chart of how template files are organised in Wordpress.

Look at the section for Site Front Page. It'll show you 2 options on that section for either a front page that is a blog page or a front page. You can use a front-page.php file to do this but the fallback is home.php.

If you're still confused ,looking at that resource is bound to clear up :)