-
AuthorPosts
-
March 10, 2015 at 2:32 am #224030
mvivesParticipantHi, 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!
March 10, 2015 at 3:32 am #224065
Rue NelModeratorHello 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
March 10, 2015 at 1:53 pm #224505
mvivesParticipantHi, 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.
March 10, 2015 at 3:52 pm #224598
DarshanaModeratorHi 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.
March 11, 2015 at 1:51 am #224826
mvivesParticipantThanks, very helpful!
March 11, 2015 at 2:37 am #224849
Rue NelModeratorWe’re happy to help! π
March 24, 2015 at 8:21 am #234037
purifiedlifestyleParticipantI 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,
AmandaMarch 24, 2015 at 1:43 pm #234249
DarshanaModeratorCould 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!
March 30, 2015 at 12:58 pm #238322
purifiedlifestyleParticipantThis reply has been marked as private.March 30, 2015 at 4:12 pm #238473
FriechModeratorHi Amanda,
Please try to add this under Custom > CSS in the Customizer.
.woocommerce-page .x-colophon.top { display: none; }Hope it helps, Cheers!
April 1, 2015 at 7:29 am #239801
purifiedlifestyleParticipantThank you, worked perfectly! π
As always you guys are the best!
Best,
AmandaApril 1, 2015 at 7:36 am #239809
ThaiModeratorYou’re welcome.
May 28, 2015 at 5:24 am #284260
bvganevParticipantHello,
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!
May 28, 2015 at 10:56 am #284632
NicoModeratorHi There,
You could try using this code.
body:not(.home) .x-colophon.top { display: none; }Hope it helps.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-224030 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
