WooCommerce Remove Sidebar

Remove Sidebar

This is a snippet to remove all WooCommerce page sidebar. By this snippet, it will only remove the sidebar. You still need to edit style.css to set the width of main to 100%. This is a method using hook instead of edit the template file.

Paste below coding at your theme’s function.php

//WooCommerce Remove Sidebar 
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );

Now, sidebar at all WooCommerce is been removed. You also need to add this coding to your child theme style.css. Some themes are not working. You need to find out the div class or id to set.

Paste below coding at your theme’s style.css

/* WooCommerce Remove Sidebar, Main Width 100% */
.tax-product_cat #main {
	width: 100%;

For sure, you may leave a comment so that we could discuss about how to edit the css of your WordPress theme if you can’t set the main width successful.

WooCommerce Remove Sidebar
Please do hesitate to contact me if you found out any mistake or typo.

Leave a Comment.

Time limit is exhausted. Please reload CAPTCHA.