• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Remove Footer Or Widgets On Specific Pages

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.

Note: Please be aware that the footer and footer widgets are different. removing the footer will not remove the footer widgets and vice versa.

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.

Related Posts

  • How To Remove Footer Widgets From Single Posts In Genesis

Footer Widgets

Reader Interactions

Comments

  1. MissKitty says

    July 21, 2016 at 10:24 am

    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.

    Log in to Reply
    • Brad Dalton says

      July 21, 2016 at 3:14 pm

      Try changing the following line

      if( !is_home() ) {

      to this

      if( is_front_page() ) {
      Log in to Reply
      • MissKitty says

        July 22, 2016 at 7:24 am

        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);
        }}

        Log in to Reply
        • Brad Dalton says

          July 22, 2016 at 4:14 pm

          Don’t forget to add this:

          remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );

          Like this:

          add_action( 'genesis_before', 'remove_footer_exclude_home' );
          function remove_footer_exclude_home() {
          if( is_front_page() ) {
          remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
          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);
          }}

          Tested and works.

          Log in to Reply
          • MissKitty says

            July 25, 2016 at 6:16 am

            That worked, thank you Brad 🙂

  2. fonte says

    November 12, 2014 at 10:05 pm

    Your advise helped me fix my site. Thanks so much!

    Log in to Reply
    • Brad Dalton says

      November 12, 2014 at 11:01 pm

      Thanks for the positive feedback.

      Log in to Reply
  3. Jeremy says

    August 13, 2014 at 7:29 pm

    thanks for this. just spent the last 2 hours trying figure this out and fixed it in 2 minutes after reading this.

    Log in to Reply
    • Brad Dalton says

      August 14, 2014 at 2:37 am

      Glad to hear it Jeremy

      Log in to Reply
  4. Robert says

    April 1, 2014 at 9:55 am

    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.

    Log in to Reply
    • Brad Dalton says

      April 1, 2014 at 10:34 am

      Try this http://wpsites.net/web-design/display-outreach-pro-sub-footer-widgets-on-front-or-home-page-only/

      Log in to Reply
      • Robert says

        April 1, 2014 at 10:41 am

        Thanks a lot, that works perfect!

        Log in to Reply
  5. Darryl says

    January 21, 2014 at 3:44 am

    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?

    Log in to Reply
    • Brad Dalton says

      January 21, 2014 at 4:04 am

      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.

      is_front_page() // Only displays on front page
      !is_front_page() // Excludes the front page
      Log in to Reply
      • Darryl says

        January 24, 2014 at 11:46 pm

        Thanks Brad. JetPack was the perfect solution – so easy!

        Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags