Reply To: Changing headers or deleting headers

Home Forums Support Changing headers or deleting headers Reply To: Changing headers or deleting headers

Home Forums Support Changing headers or deleting headers Reply To: Changing headers or deleting headers

#98390
Tom
Lead Developer
Lead Developer

Hi Lowana,

By header, do you mean where the site title/tagline go? Above the navigation?

If so, you can disable the header on certain pages using the Disable Elements add-on.

To display different headers on different pages, you’ll have to use GP Hooks.

For example:

<?php if ( is_page( 'about-page-slug' ) ) { ?>
      <img src="URL TO YOUR HEADER FOR THIS PAGE" alt="" />
<?php } elseif ( is_page( 'another-page-slug' ) ) { ?>
      <img src="URL TO YOUR HEADER FOR THIS PAGE" alt="" />
<?php } elseif ( is_page( 'one-more-example' ) ) { ?>
      <img src="URL TO YOUR HEADER FOR THIS PAGE" alt="" />
<?php } else { ?>
      <img src="URL TO YOUR HEADER FOR ALL OTHER PAGES" alt="" />
<?php } ?>

You would add the above into the “Before Header Content” hook in GP Hooks, and update the page slugs to match the pages you’re trying to target.

Then place the URL to your header image for each page.

The last one is the header for all other pages not mentioned above it.

Be sure to check the “Execute PHP” checkbox as well.

Let me know if you need more info 🙂