Storefront is a nice starter WooCommerce theme. It is something like the Underscore_s but for the WooCommerce. This could be the base to build a beautiful e-shop. If you are using the Storefront Theme on your eCommerce site, you noticed maybe that your shop page and all other WooCommerce pages such as product page, category archive, etc. always have a sidebar.

Unfortunately, you can’t find any option in the dashboard to remove it. Unless you use the Storefront extension Storefront WooCommerce Customizer.

WooCommerce Storefront remove sidebar

WooCommerce Storefront Homepage

But there’s also another way to remove it

If you are into coding, you can unhook some Storefront actions to remove the sidebar on all WooCommerce pages or only some of them, and with a bit of CSS you can increase the size of the main container.

In WooCommerce Theme Storefront remove sidebar

Open your functions.php file in wp-content/themes/your-child-theme-name/ and add this code at the end of it:

function bake_my_wp_remove_storefront_sidebar() {
	if ( is_woocommerce() || is_checkout() ) {
		remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
add_action( 'get_header', 'bake_my_wp_remove_storefront_sidebar' );

Now, open your child theme’s style.css in the same location and add this code:

body.woocommerce #primary,
body.woocommerce-checkout #primary {
	width: 100%;

Now you can see that all your WooCommerce pages won’t have a sidebar anymore.

WooCommerce Theme Storefront remove sidebar for some pages

If you wish instead to remove it only from some pages, like only on product pages, you can change the condition on line 3 in the first PHP snippet and use a different WooCommerce conditional tag.

WordPress Support Services

Do you need a super fast and optimized website like ours?
We do things different at BakeMyWP!

Get a Free Quote

4 comments on “101 WooCommerce Theme Storefront remove sidebar super fast

Leave a Reply

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