How do I get rid of the sidebar in WooCommerce?

Last updated on | 2 replies

Open your functions.php file in your WordPress themes folder (usually in /wp-content/themes/your_theme_name) and paste this to the bottom:

function remove_storefront_sidebar() {
	remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
}
add_action( 'get_header', 'remove_storefront_sidebar' );

Add this CSS to your styles file (usually in /wp-content/themes/your_theme_name/style.css)

body.woocommerce #primary { width: 100%; }

body.woocommerce.single-product #primary { width: 100%; }

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

2 replies

Leave a reply

Your email address will not be published. Required fields are marked *