• Resolved thetoolman123

    (@thetoolman123)


    Hi,

    I have a main homepage template and a Full Width template.

    I am trying to add a different header to the Full Width template.

    In the Full Width template, I have the following:

    <?php
    
    /*
    
    Template Name: Full width
    
    */
    	get_header();
    ?>

    I have saved a different version of the header called header-inside.php

    How can I tell this template to use the header-inside file instead of the default header file?

    Any help would be great, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter thetoolman123

    (@thetoolman123)

    I managed to work it out – I used an include:

    <?php
    /*
    Template Name: Full width
    */
    
    include( get_template_directory() . '/header-inside.php');
    ?>

    Please try this code and called header-inside

    <?php
    
    /*
    
    Template Name: Full width
    
    */
    	get_header(inside);
    ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a different header to a page template’ is closed to new replies.