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 Building Page Templates in WordPress The page.php File

Anthony c
Anthony c
20,907 Points

Does WordPress Know to Look for Page.php automatically?

I didn't notice that we initialized or signaled to wp that page.php would be our page template. Is core set up to look for a page.php from the get go?

1 Answer

Luke Towers
Luke Towers
15,328 Points

You should look into the template hierarchy. There is a handy diagram that shows how WordPress decides which PHP file it will use to render the requested content.

template hierarchy diagram