Find out how to remove the footer widgets on specific pages 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. 😉
I already showed you how to do it just for the home page and now you’ll learn how to remove the footer widgets in any other Genesis page:
Snippet to remove footer widgets on any Genesis page
Insert this fragment at the end of the functions.php file:
There you have. The footer widgets will be displayed throughout the site, except for the pages you have indicated within the snippet.
In this case, they are “about me” and “contact”, but you can always modify this snippet according to your needs.
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 every page.
Now you know how to hide them in a specific page by using code.
Any questions? I read you in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉