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 WordPress Page and Post Templates Quiz

Martina Carrington
Martina Carrington
15,754 Points

What filename would you use to control a static page with the id of 4?

I re-watch the video see if i miss anything , I though the correct answer was page.php or page-102 but i received a bummer

3 Answers

rydavim
rydavim
18,813 Points

When naming pages with an ID, the hierarchy template defines it as page-$id.php. In this case, because the id is 4, you would want to use page-4.php.

I find this reference image particularly helpful when dealing with the Wordpress hierarchy. Wordpress Hierarchy Template

August Oliver
August Oliver
5,933 Points

The answer is: page-4