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 WordPress Theme Development Custom Homepage Templates in WordPress A Blog Listing Homepage

Jeffrey Cunningham
Jeffrey Cunningham
5,592 Points

So basically the WP template hierarchy lies?

Really the font-page.php should be next to both the "static front page" AND "blog posts index" boxes right?

4 Answers

Oh ok. You're actually wrong on this one though. There's an option to set what you want as the front page. By default you'll see the blog index then the pages follows the hierarchy as seen on the site. If you want a static front page then wordpress looks for the front-page.php file then follows the hierarchy as shown on the site.

Jeffrey Cunningham
Jeffrey Cunningham
5,592 Points

Ok that's what I was getting at. So you are saying that as long as the "front page displays" is set to "latest posts" then it uses the hierarchy as seen. However, if it is set to "A static page" then it would look something like the example I posted above where it defaults front-page.php. Correct me if I'm still not getting it.

Yes. The file "front-page.php" isn't in wordpress by default; it's created. Read this page: http://codex.wordpress.org/Creating_a_Static_Front_Page

Jeffrey Cunningham
Jeffrey Cunningham
5,592 Points

Ok I got. Thanks for your help!

I'm not understanding your question here. Which WP Hierarchy are you talking about? This site? http://wphierarchy.com/

Jeffrey Cunningham
Jeffrey Cunningham
5,592 Points

Yes that is the hierarchy I'm referring to. What I mean is that the blog posts index page will default to front-page.php before it uses home.php, but if you were to use the hierarchy you would think that it would not.

So I'm saying the realistically the hierarchy should look like this:

Blog posts index page---------------font-page.php------------------------home.php

No problem, man!