skip to Main Content

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.

2

Answers


  1. 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.

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search