If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #12702

    I need to create a different header.php file for the inside pages loosely based on the original header.php file. How difficult is this? I have found many online resources with instructions but I figured it best to ask my theme author before going too far. Any insight would be a huge help.


    Hi reggiescott,

    In order to use a separate header for the inside pages, you would have to edit each template file e.g. template_blog.php, template_contact.php, template_fullwidth.php, template_portfolio.php, etc. so that it would point to that header.

    The code you would need to alter is:


    You would need to have something like this:


    When creating the header file you’ll want to keep everything before the DIV “wrapper” for sure otherwise your pages may become skewed.

    Hope this helps!




    I tried this and is does not seem to be working. My new get_header code reads:

    get_header( ‘header-inside.php’ ); – which is definitely on the server.

    The new header is calling a new class for the wrapper – .wrapper2 – in style1.css that ONLY changes the background image for the header from bg.png to bg2.png.

    What could I be doing wrong?


    Any more info on this? I tried the solution provided but it did not work.


    Hi reggiescott,

    If you are only looking to change the background image on the page, you can use css with a lot less hassle. For the display theme, you would add new css for each page that you wanted to have a custom background. Following this example:

    #subpage.page-id-## .wrapper {
    #fff url(../images/skin1/bg.png) repeat-x 0 -370px;

    If its a portfolio page or blog page, the css changes a bit since the class name for those pages is different:

    #subpage.postid-## .wrapper {
    #fff url(../images/skin1/bg.png) repeat-x 0 -370px;

    In both of the above the ## needs to be replaced by either the Page ID or the Post ID number. This can be found in the URL of the page (just one way to find it) when you edit the post or page. If you are using Firebug or Inspect Element in chrome, you can find it in the body class line for the page you are inspecting.



Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Create multiple header files’ is closed to new replies.