Load different header on Homepage
-
[Note: I’m not too proficient with php so this might be a very noobish mistake]
I need to load a different header section on my homepage from the rest of the site. From what I have researched it seems I need to implement a piece of code in my header.php:
something like:
if ( is_front_page() ) : get_header('header-home.php'); elseif ( is_404() ) : get_header('404'); else : get_header('header-site.php'); endif; ?>
I’ve created two copies of my header.php namely header-home.php and header-site.php. One with and the other without the jquery. The code was placed right below <div id=”wrapper” class=”hfeed”> but above the <nav> section. When I fire up my site no header is loaded. It seems like the php isn’t even read!
Any ideas what could be wrong?
Thanks for your time! ??
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Load different header on Homepage’ is closed to new replies.