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 How to Build a WordPress Theme Content Strategy with WordPress Adding Custom Content to the Site

Call custom header from options page ACF Pro

I'd like to know how to select different header.php files (ex: header-slim.php, header-stacked.php, etc) and apply them globally (from the ACF PRO options page). This is so I can create different site header layouts (slim full-width, stacked w/centered logo, etc) and make the theme I am building modular. I also want to be able to select different footer.php files so choosing a footer layout is quick.

Just not quite sure how the php should look as far as editing the normal <?php get_header() ?> call in a template file or default file (index.php, page.php, page-home.php, etc).

So far, I've only started creating a field group with a drop down selector that has the header style names. I was thinking a non-selection would mean the normal get_header call takes place, while selecting one of the options in the drop down would then change the call to something like get_header('slim') or get_header('stacked') depending on what's selected from the dropdown. Where do I go from here?