If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
Hoping for a bit of direction. I looking to have a different header.php file presented depending on the Page id. I assumed some code added to the get_header tag in the template-dynamic.php file with an array would work but not having any luck. Can you provide any support for this? I understand its above and beyond theme support but you guys are always pretty great with a helpful hand.
Basically you need to combine the get_header tag with templates and conditions – eg create two files:
header.php and header-special.php and in template-dynamic.php and page.php replace
if ( is_page(array(42, 50)) ) :
get_header( 'special' );
Thanks dude. I had it except I was only updating the template file. Also updating the page file did the trick. Thanks as always for your great support!
The topic ‘Conditional header file depending on page ids’ is closed to new replies.