You can remove your footer and or footer widgets using several methods.
The best way is to write a custom function and add the code to the end of your child themes functions.php file.
If you only want to remove your footer or footer widgets from specific pages, posts, category and other archive pages, tbe best way is to add a conditional tag to your custom function.
The easiest way to remove footer widgets or any widgets for that matter, is to choose from a list of conditional tags, and paste the tag into the widget logic field added to all widgets after installing the plugin.
Simply change the hooks depending on which theme your are using.
You can also easily change the conditional tag as well.
Remove Footer Site Wide
This code removes the footer from your entire site
remove_action('genesis_footer', 'genesis_do_footer');
remove_action('genesis_footer', 'genesis_footer_markup_open', 5);
remove_action('genesis_footer', 'genesis_footer_markup_close', 15);
Remove Footer On Home Page Only
This code removes the footer and markup from the home page only using a conditional tag.
add_action('get_footer', 'child_remove_genesis_do_footer');
function child_remove_genesis_do_footer() {
if (is_home()) {
remove_action('genesis_footer', 'genesis_do_footer');
remove_action('genesis_footer', 'genesis_footer_markup_open', 5);
remove_action('genesis_footer', 'genesis_footer_markup_close', 15);
}
}
If you’re using another theme, you can change the hooks to match your themes.
Remove Footer Site Wide Excluding Home Page
Remove Footer Widgets & Footer Excluding Home Page
Display Footer Widgets Front Page Only
Use this code if you’re using a static or custom page as your home page and another page as your blog page.
Display Footer Widgets Home Page Only
Use this code if you’re using the default settings to display blog posts on your home page.
Using CSS Code To Remove Footer Widgets
Note: Uses the old XHTML markup. Please convert to HTML 5 if your themes supports it and change the I.D classes to HTML selector classes.
An easier way to remove footer widgets is to use CSS code:
This code will remove footer widgets on the home page.
.home #footer-widgets {
display: none;
}
This code will remove footer widgets using the page i.d
.page-id-007 #footer-widgets {
display: none;
}
This code will remove the footer widgets on all posts in a specific category.
.category-134 #footer-widgets {
display: none;
}
Change the category i.d to match your own.
You may also find this post about how to remove different widgets using various methods helpful.
Hi Brad,
How about removing footer and footer widgets on home page only? )The opposite of the fourth snipped of code you provided above). Using Agency Pro theme.
Try changing the following line
to this
No luck. I’ve tried:
add_action( ‘genesis_before’, ‘agency_remove_footer_exclude_home’ );
function agency_remove_footer_exclude_home() {
if( is_home() ) {
remove_action(‘genesis_footer’, ‘genesis_do_footer’);
remove_action(‘genesis_footer’, ‘genesis_footer_markup_open’, 5);
remove_action(‘genesis_footer’, ‘genesis_footer_markup_close’, 15);
}}
as well as
add_action( ‘genesis_before’, ‘agency_remove_footer_exclude_home’ );
function agency_remove_footer_exclude_home() {
if( is_front_page() ) {
remove_action(‘genesis_footer’, ‘genesis_do_footer’);
remove_action(‘genesis_footer’, ‘genesis_footer_markup_open’, 5);
remove_action(‘genesis_footer’, ‘genesis_footer_markup_close’, 15);
}}
Don’t forget to add this:
Like this:
Tested and works.
That worked, thank you Brad 🙂
Your advise helped me fix my site. Thanks so much!
Thanks for the positive feedback.
thanks for this. just spent the last 2 hours trying figure this out and fixed it in 2 minutes after reading this.
Glad to hear it Jeremy
Hi Brad,
Is this also possible with sub footers? I would like to display the sub footers (Outreach Pro theme) only on the homepage.
I’ve been trying this with code snippets but I can’t figure it out.
Thanks in advance.
Try this http://wpsites.net/web-design/display-outreach-pro-sub-footer-widgets-on-front-or-home-page-only/
Thanks a lot, that works perfect!
Very helpful, thanks Brad!
Is there a way to add another set of footer widgets so one could have 3 footer widgets on the Home page and then a different set of 3 footer widgets on all other pages?
Yes but no need as you can add multiple footer widgets to each footer widget area with different conditional tags to control where they display using the Widget Logic plugin, Jetpack etc.
Thanks Brad. JetPack was the perfect solution – so easy!