Conditional Tag not working
-
Hi,
I am using a child-theme of TwentyTwelve – twentytwelve-child. I want to use a different header on my contact page. I am using this code at the top of my page.php file:wp_reset_query();
if (is_page(‘Contact’)) {
get_header(‘contact’);
} else {
get_header();
}As you can see, if I’m on the Contact page, it should use the header-contact.php file. I’ve created header-contact.php and referenced a different header image in that file.
Unfortunately, it doesn’t work. I’ve tried deactivating all plugins. As you can see, I’ve also tried adding wp_reset_query() before the conditional tag code, because I heard that might be necessary. It still doesn’t work.
Does anyone have any clues? Here is the page: https://webscript2wp.com/contact/
Thanks!
- The topic ‘Conditional Tag not working’ is closed to new replies.