Reply To: Settings to turn off Sidebar on Woocommerce's page Shop

Home Forums Support Settings to turn off Sidebar on Woocommerce's page Shop Reply To: Settings to turn off Sidebar on Woocommerce's page Shop

#207789
Tom
Lead Developer
Lead Developer

Hi there,

No need to add “Shop” in the is_woocommerce() call.

Your code would be:

add_filter( 'generate_sidebar_layout','generate_custom_woocommerce_sidebar_layout' );
function generate_custom_woocommerce_sidebar_layout( $layout )
{
 	// If we are on a woocommerce page, set the sidebar
 	if ( is_woocommerce() )
 	 	return 'no-sidebar';

 	// Or else, set the regular layout
 	return $layout;

 }