• How do I change the header page for a selected section.
    I have created a template called
    services.php
    servicessidebar.php

    And now I want to create servicesheader.php
    I have the page created but cant call it.

    How do I do this as changing the call
    <?php get_header(); ?> to <?php get_servicesheader(); ?> has no effect.

    Can this be done.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The get_header(); function is a native WordPress function which calls for the file header.php

    but if you want something else instead, a self-made file for instance,
    you can include it by using a PHP function.

    <?php include(‘servicesheader.php’); ?>

    Still, I’m a little confused to where you are going to put it.

    Thread Starter neweb

    (@neweb)

    I will try it in place of the
    <?php get_header(); ?>
    Meaning I will remove the code above and put your code in its place.

    Thread Starter neweb

    (@neweb)

    Well I tried it and it worked perfect 🙂

    This opens lots more options for design.

    Here is the link so you can see what I was trying to do.
    http://design.newebirl.net

    Click the design then the client services to see the change in the header.

    Thanks for your help with this! You got it first time 🙂

    Thread Starter neweb

    (@neweb)

    PS
    This is still a work in progress

    neweb, I’m glad you got it working.
    I said I was confused for I didn’t know your theme structure, however, it’s great to hear it worked by simply substituting the get_header() line code.

    Cheers.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘change header page’ is closed to new replies.