I am new in WordPress, I want to know how to add footer other then default footer ( example: Footer file name - home-footer.php and need to use for home page, same as contact-us-footer.php for contact us page ). let me how i can achieve this.
CodePudding user response:
You have to name the file footer-home.php
. Then you can call this footer in the page template (i.e. page-home.php) using get_footer('home')
.
Wordpress will use the right file, if it is named correctly starting with footer-*.php
.
CodePudding user response:
if you are adding your files in theme or WordPress core files then this will automatically remove when your WordPress will be updated unless you creat child theme so just better to create to footers with any page builder I recommend elementor and then hide that with page id you will find that in the body tag of every page like this .page-id-111 .footer{ display:none;} Let me know if you don't understand anything