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

WP SITES

2296

Original Genesis Tutorials & 5000+ Code

Snippets

  • Subscribe
  • Full Access
  • Videos
  • Log in
  • Twitter
  • Facebook
  • LinkedIn
  • Email
  • More
  • Reddit
  • Tumblr
  • Google
  • Print
  • Pinterest
  • Telegram
  • Pocket
  • Skype
  • WhatsApp

Remove Sidebar on WooCommerce Pages

This tutorial provides 2 ways to remove the sidebar from any type of WooCommerce page in Genesis child themes.

1. You can change the Layout Settings on Edit Product pages and select the full width layout like this:

or

2. Use code with the is_product() or is_singular( 'product' ) ) conditional tag.

Make sure you have the Genesis WooCommerce Connect plugin activated.

Here’s the code to remove the sidebar from all WooCommerce product pages:

add_filter( 'genesis_pre_get_option_site_layout', 'full_width_layout_product_pages' );
function full_width_layout_product_pages( $opt ) {
if ( is_product() ) {
    $opt = 'full-width-content'; 
    return $opt;
    } 
}

To remove the sidebar from other WooCommerce pages, swap out the is_product conditional tag with any other WooCommerce conditional tag like this :

add_filter( 'genesis_site_layout', 'woocommerce_page_layout' );
function woocommerce_page_layout() {
    if ( is_page ( array( 'cart', 'checkout' )) || is_shop() || 'product' == get_post_type() || is_woocommerce() ) {
        return 'full-width-content';
    }
}
Subscribe for new Genesis Tutorials

Layout WooCommerce

Primary Sidebar

Brad Dalton Specializes In StudioPress child theme customization & code modification. Access all code

Featured Downloads

  • Responsive Image After Header On Single Pages 67126
  • Rotate Widget Background Images In Genesis 67200
  • Template To Display All Posts by Each Category In Genesis 67050
WordPress Speed Test
  • Membership
    • Account Subscription Details
  • Tagged by Theme
  • Blog
  • T.O.C
    • Membership F.A.Q’s
  • RSS
  • Contact
  • Newsletter ( Twice Weekly )

Usage Policy · Tools & Resources


Images, code, and content on this website are property of wpsites.net and are protected by copyright law.
WP Sites does not grant permission for any repurposing, republication, or redistribution.
"Disclosure: Some of the links in some posts are "affiliate links."
This means if you click on the link and purchase the item, I will receive an affiliate commission.
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.