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 Homepage Templates in WordPress home.php

Jack Ko
Jack Ko
15,920 Points

What happens to blog posts page if front-page.php and home.php conflict with each other?

As shown in video, the blog posts page are both affected by front-page.php and home.php. What if the two templates conflict with each other?

1 Answer

Mischa Yartsev
Mischa Yartsev
20,562 Points

<p>Hello, Jack Ko.</p>

Take a look at awesome WordPress template hierarchy page. It's beautiful shown how templates works in WP.

WPhierarchy

<p>As I understand it, those pages wouldn't conflict with each other, because only one page would load at a time.

For example,</p> if front-page.php has been set, then it loads it, if that page has not been set then it's load home.php and if home.php is also missing, it then loads index.php.