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 Core WordPress Theme Files The Core WordPress Theme Files Quiz

Kelly Miller
Kelly Miller
1,773 Points

What is the name of the file called by get_sidebar("blog")?

This is a question on a quiz, and I'm just curious about the answer.

1 Answer

Austin Whipple
Austin Whipple
29,725 Points

Have a look at the Codex arcticle on get_sidebar().

Essentially, WordPress will look for sidebar.php if you don't include a name in parenthesis. If you do, it'll look for a file with a file in the format of sidebar-my-sidebar-name.php. So in this case, it would call sidebar-blog.php.