Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #28912


    I’ve looked through much of the forums; the answer might be in there as it has been for other issues, but I did not see it, as my question seems to be slightly different. Sorry if it already has been answered! Here it is:

    I’m looking to create a custom header for specific sections of pages. The normal, default header will be used for most of the site, however for a section, I need to have a different header with a different logo and a few other things. This section of pages will most likely use a different template (which I would think would call a different header.php file or something along those lines).

    How can I create a custom header to be used for a different section of pages (via custom template?). What’s the workflow / calls?

    Thanks so much- great theme!



    I’d personally recommend using a WP Multisite approach.




    Thanks for the recommendation, Josue!

    We had looked into that approach, but seems to be overkill for what we need. A simple template for a couple pages, almost exclusively to deal with a logo override (the biggest need), would suffice. Any other ideas?

    I tried creating another header ( header-republic.php ) and within my template, instead of get_header(); I put get_header('republic'); unfortunately, to no avail. add_theme_support('republic'); was also added to empty child theme functions.php file.

    Thanks again!



    You need to create a “header-republic.php” file to make get_header(“republic”); work.




    Thanks, Josue! I believe I wrote that, and it doesn’t seem to be calling it.


    Hi jguerrero01,

    Unfortunately all we can really do is refer you to the codex entry for get_header since it isn’t code we wrote, have access to or can verify that it has been written correctly:

    In theory, that is the correct way to have your file get a different header file and its just up to WordPress to read the code and execute it.




    No problem! That is the link I have sourced, among many others. At least the theory is sound. :)

    Thanks, guys!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Custom Section Header’ is closed to new replies.