Create multiple headers, footers, sidebars for different templates in WordPress
First copy and paste theme header.php file and rename it in your current theme. i.e. header-customheader.php . After that open header-customheader.php file and according to your needs change your header layout and functionality.
now open page template file and add the header-customheader.php file using below function where you want to show it.
get_header('customheader');
you can create multiple headers for multiple pages. Same way you can create different footer.php, sidebar.php for different pages.
you can calll them in your templates like:
get_footer('customfooter');
get_header('customsidebar');
First copy and paste theme header.php file and rename it in your current theme. i.e. header-customheader.php . After that open header-customheader.php file and according to your needs change your header layout and functionality.
now open page template file and add the header-customheader.php file using below function where you want to show it.
get_header('customheader');
you can create multiple headers for multiple pages. Same way you can create different footer.php, sidebar.php for different pages.
you can calll them in your templates like:
get_footer('customfooter');
get_header('customsidebar');
Recommanded Articles
- Generate Dummy Posts in WordPress
- How to add captcha in Contact Form 7
- how to create a cron job in wordpress
- How to get form data in Contact Form 7
- Insert Update Delete Select query in WordPress
- How to increase website speed
- Create plugin in WordPress in which create table in DB on activate
- Create new tab under my account WooCommerce frontend
- Custom image sizes in WordPress
- Get posts by meta key and meta value in WordPress
Latest Comments
Ravi shankar
18 Dec 2020Sid
22 Dec 2020