How to call specific header for child pages of parent?
-
I am designing a custom theme that essentially has 3 site sections.
MAIN PAGE (header-home.php)
Secondary Main Page (header-ph.php)
Third Main Page (header-bh.php)
Each section will have a dynamic nav in relation to the parent page you’re on.
Right now I can get each Parent page to pull it’s respected header however the child pages to each parent pull in the default header.
Here is my code.
MyHome.php
<?php get_header (‘home’); ?>PublicHealth.php
?php get_header(‘publichealth’); ?>PublicHealth.php template is called to the Public Health parent page. I then created subpages (child pages) from this parent. However the header resorts to the ‘home’ header vs the ‘publichealth’ header.
What sort of conditional code do I need in here to make this happen? I’ve searched and tried a few suggestions with no luck.
Thank you,
- The topic ‘How to call specific header for child pages of parent?’ is closed to new replies.