Saturday 5 November 2016

How to add multiple header and footer in WordPress?


IT NEW CODE give a trick to make multiple header & footer  templates.
Sometimes We need multiple kind of look & client needs different header.
In such a case need to create multiple header files.
Below describes how to create multiple headwer & footer.

Create New Header:-
In Your theme defalt header file name as "header.php".
You create new header file like,"header-cast.php"
and put your code in it.

Now How to call this in your template? just put following code where you want to add.

<?php get_header('cast'); ?>


Create New Footer:-
Now, You can do same for footer.
You create new footer like,"footer-cast.php"

put following code to call it.

<?php get_footer('cast'); ?>



For more Interesting, Useful Article & codes visit IT New Code.
IT NEW CODE always help you with new Developing Code.

Ankit Shah PHP Expert

IT New Code suggest a solution for your problem related to coding, Specially .PHP, Wordpress, WooCommerce, Magento, HTML and CSS. Visit Our website for Information.

1 comments:

 

Copyright @ 2016 IT New Code | Developing Code | Designing Code.

Designed by: Ankit Shah