2014 Woocommerce Remove Sidebar
-
I’ve been working with the new 2014 theme and Woocommerce. As many others have noted, the right hand “sidebar” can be a distraction while the customer is in the shop and checking out. This solution is for the “Content Sidebar” only, and not the Primary Sidebar (down the left side).
In your admin menu, Appearance -> Editor
Scroll down to the file sidebar-content.phpIn your window you’ll see this:
<?php /** * The Content Sidebar * * @package WordPress * @subpackage Twenty_Fourteen * @since Twenty Fourteen 1.0 */ if ( ! is_active_sidebar( 'sidebar-2' ) ) { return; } ?> <div id="content-sidebar" class="content-sidebar widget-area" role="complementary"> <?php dynamic_sidebar( 'sidebar-2' ); ?> </div><!-- #content-sidebar -->
Just change it to this:
<?php /** * The Content Sidebar * * @package WordPress * @subpackage Twenty_Fourteen * @since Twenty Fourteen 1.0 */ if ( is_woocommerce( ) ) { return; } ?> <div id="content-sidebar" class="content-sidebar widget-area" role="complementary"> <?php dynamic_sidebar( 'sidebar-2' ); ?> </div><!-- #content-sidebar -->
This will remove the Content Sidebar (right hand only) from the shop and product pages only. That’s because these pages are actually posts. Now you need to change the Cart, Checkout, My Account, and Logout. You can do this simply by editing the page itself and changing the template to “Full Width Page”. Personally, I left the Logout page alone.
I’ve seen a lot of people asking about this, and many many different answers. This will work immediately, and it’s a very simple fix that takes only a minute. No need to build a Child Theme and go through all that for this simple change.
I hope this helps you.
Tom
- The topic ‘2014 Woocommerce Remove Sidebar’ is closed to new replies.