Forums
Home / Fixing WordPress / Multiple headers
(@nic727)
7 years, 7 months ago
Hi,
I would like to know how to make a different header for different page. For example, I would like my header for post, project and 404 to be different from my index page.
I read that https://codex.wordpress.org/Function_Reference/get_header
But I don’t understand where to put
<?php if ( is_home() ) : get_header( 'home' ); elseif ( is_404() ) : get_header( '404' ); else : get_header(); endif; ?>
Also, does the name of the header is the name of the menu?
Thank you
(@scottiescotsman)
You need to create a custom header in your functions.php then add it to where you want it to be placed.