-
AuthorPosts
-
September 3, 2013 at 4:37 pm #28912
Hi,
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!
September 3, 2013 at 7:06 pm #139121September 4, 2013 at 12:07 am #139122Thanks 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 putget_header('republic');
unfortunately, to no avail.add_theme_support('republic');
was also added to empty child theme functions.php file.Thanks again!
September 4, 2013 at 6:11 am #139123Hi,
You need to create a “header-republic.php” file to make get_header(“republic”); work.
Regards,
Josue
September 4, 2013 at 6:06 pm #139124Thanks, Josue! I believe I wrote that, and it doesn’t seem to be calling it.
September 5, 2013 at 2:04 pm #139125Hi 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: http://codex.wordpress.org/Function_Reference/get_header
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.
Regrds,
Devin
September 5, 2013 at 4:23 pm #139126No problem! That is the link I have sourced, among many others. At least the theory is sound. :)
Thanks, guys!
-
AuthorPosts
- The topic ‘Custom Section Header’ is closed to new replies.