Some time we have facing issue with multiple header in site
here I am showing you how you can create multiple header file in wordpress and you can add in different pages
- First copy header.php file
- After rename the copy file header-mynew.php
- You can replace mynew word with your header file name
- After open your template or php core file which you want to add header
- And change get_header(); to
get_header(‘mynew’)
if you want to add condition in page
<?php if(is_page(50)) { get_header('mynew'); } else { get_header(); } wp_head(); ?>
Same you can create footer new file
I hope this article will be helpfull 🙂