Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
Jonathan Grieve
Treehouse Moderator 90,705 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 90,705 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 :)