Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #224030
    mvives
    Participant

    Hi, I’m using the Integrity 1 stack. How do I remove the Footer Widgets from select pages while still keeping the bottom footer that contains the footer navigation, copyright, etc.–the area in the red box in this image: http://screencast.com/t/R9s9BA6S

    When I chose a “No Footer” template option, it gets rid of the Footer Widgets AND the bottom footer. Is there a way to just get rid of the Footer Widgets on select pages?

    Please let me know. Thanks!

    #224065
    Rue Nel
    Moderator

    Hello There,

    What you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    To get rid of that, please add the following code in your functions.php

    // Widget Area Active
    // =============================================================================
    
    if ( ! function_exists( 'x_footer_widget_areas_active' ) ) :
      function x_footer_widget_areas_active() {
    
        $n = x_footer_widget_areas_count();
    
        $i = 0; while ( $i < $n ) : $i++;
    
          if ( is_active_sidebar( 'footer-' . $i ) ) {
            return true;
          }
    
        endwhile;
    
        return false;
    
      }
    endif;
    // End Widget Area Active
    // =============================================================================

    And we also need to tweak the VIEWS/GLOBAL/_FOOTER-WIDGET-AREAS.PHP, please create a new file, insert the code below and save filename as _footer-widget-areas.php and please upload the file in your child themes folder, /wp-content/themes/x-child/framework/views/global/ in your server.

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_FOOTER-WIDGET-AREAS.PHP
    // -----------------------------------------------------------------------------
    // Outputs the widget areas for the footer.
    // =============================================================================
    
    $n = x_footer_widget_areas_count();
    
    ?>
    
    <?php if ( $n != 0 && x_footer_widget_areas_active() ) : ?>
    
      <footer class="x-colophon top" role="contentinfo">
        <div class="x-container max width">
    
          <?php
    
          $i = 0; while ( $i < $n ) : $i++;
    
            $last = ( $i == $n ) ? ' last' : '';
    
            echo '<div class="x-column x-md x-1-' . $n . $last . '">';
              dynamic_sidebar( 'footer-' . $i );
            echo '</div>';
    
          endwhile;
    
          ?>
    
        </div>
      </footer>
    
    <?php endif; ?>

    If you have properly placed the code, it should work and disables the gray bar when there is no footer widget areas active.
    Feel free to let us know if this has work for you.

    Thank you

    #224505
    mvives
    Participant

    Hi, thanks for the reply. I appreciate the help!

    I’m not quite sure if what you recommended is exactly the solution for what I’m trying to do. I implemented your recommendations, but nothing has changed.

    I like how everything appears in this image: http://screencast.com/t/R9s9BA6S

    However, on some pages, I would only like the bottom footer (the area within the red box) to show, and not the Widget Footer Area. Again, only for select pages…not sitewide.

    Thanks for the help.

    #224598
    Darshana
    Moderator

    Hi there,

    Thank you for the explanation. The easiest way to achieve that is by using CSS. You can get the Page/ Post IDs as mentioned here (https://theme.co/x/member/kb/how-to-locate-post-ids/) and use it along with CSS rules.

    You can place your CSS rules into your Customizer, Custom > CSS section using the menu Appearance -> Customize.

    Follow the example below.

    
    .page-id-3034 .x-colophon.top {
        display: none;
    }
    
    .single-post .x-colophon.top {
        display: none;
    }
    
    .blog .x-colophon.top {
        display: none;
    }
    
    .postid-5616 .x-colophon.top {
        display: none;
    }
    

    Hope that helps.

    #224826
    mvives
    Participant

    Thanks, very helpful!

    #224849
    Rue Nel
    Moderator

    We’re happy to help! πŸ˜‰

    #234037
    purifiedlifestyle
    Participant

    I too needed this information and it helped out very much! Thanks.
    I have another related question.
    Is there a way I can do the same thing, get rid of footer widget areas for woo commerce products, and product categories or just the whole shop in general?

    Thanks,
    Amanda

    #234249
    Darshana
    Moderator

    @purifiedlifestyle

    Could you please provide us with a URL to your shop page? so that we can take a closer look and assist you with a tailored solution.

    Thanks!

    #238322
    purifiedlifestyle
    Participant
    This reply has been marked as private.
    #238473
    Friech
    Moderator

    Hi Amanda,

    Please try to add this under Custom > CSS in the Customizer.

    .woocommerce-page .x-colophon.top {
    	display: none;
    }

    Hope it helps, Cheers!

    #239801
    purifiedlifestyle
    Participant

    Thank you, worked perfectly! πŸ™‚

    As always you guys are the best!

    Best,
    Amanda

    #239809
    Thai
    Moderator

    You’re welcome.

    #284260
    bvganev
    Participant

    Hello,

    I have a related question, as well.

    My issue is similar to mvives’s – I’d like to remove the footer widgets but keep the bottom footer containing the copyright.
    However, I’d like to remove the footer widgets from ALL pages except the homepage (including blog, posts, portofolio, portfolio items, pages, etc.). What is the best custom CSS to use?

    Thank you in advance for your help!

    #284632
    Nico
    Moderator

    Hi There,

    You could try using this code.

    body:not(.home) .x-colophon.top {
    
    	display: none;
    
    }
    

    Hope it helps.

    Thanks.

  • <script> jQuery(function($){ $("#no-reply-224030 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>