Find out how to remove footer widgets from the home page of any Genesis Framework child theme using code.
After seeing the tutorial where I explained how to add widget areas in the footer, a subscriber asked me:
Hello! And is there a code snippet to hide those widgets on a certain page? For example: in the home page.
I know there are some plugins that do it, but it would be great to learn how to do it with code.
You would not believe what I’m learning with these snippets.
So, as usual, I set to work on it. 😉
Here’s how to remove the footer widgets from your Genesis home page:
Snippet to remove footer widgets on the Genesis home page
Insert this code at the end of the functions.php file:
There you have. From now on, the footer widgets will be displayed on all pages except the main one.
The widget areas at the bottom of the page are very practical when placing social networks, a secondary menu or any other information. But you may not want to show them on the home page.
Now you know how to hide them with code.
If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.
Benefits of being a subscriber. 🙂