0

I just want to hide the footer from the homepage and the rest of the website footer should remain the same. how can i do that? here is my website http://texmex-cantina.com/ Thanks in advance.

1
  • Hi, we help people with problems with their own coding here. Can you post your code and explain what you have tried? Commented Jun 22, 2018 at 15:32

2 Answers 2

1

You can copy the footer.php file to your child theme and add condition to not display on home page.

if (!is_home() || ! is_front_page()){
    // All the codes which are not supposed to display on the front page or home page
}
4
  • Instead of child theme, Can i add this code the parent theme?
    – TRG Soft
    Commented Jun 22, 2018 at 10:22
  • you can, but it'd not recommended because if you update parent theme then it'll be lost after you update the theme, and you will have to re apply.
    – Akshat
    Commented Jun 22, 2018 at 10:28
  • Should i replace your code with some other codes in footer.php? i tried to put it at the end of footer.php but it didn't worked out.
    – TRG Soft
    Commented Jun 22, 2018 at 10:38
  • which all div's do you want to remove? you can put all under this condition.
    – Akshat
    Commented Jun 22, 2018 at 10:39
1

Depending on your theme, Wordpress has a front-page.php file that will act as the home page if present and set. This would allow you to use it as a separate page template from the rest of your site.

https://codex.wordpress.org/Creating_a_Static_Front_Page#Configuration_of_front-page.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.