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.
Arian Xhezairi
Member
Posted 3 years ago #
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.
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.
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 :)
PS
This is still a work in progress
Arian Xhezairi
Member
Posted 3 years ago #
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.