use this snippet in function.php to remove side bar
function remove_sidebar( $is_active_sidebar, $index ) {
if( $index !== “sidebar-1” ) {
return $is_active_sidebar;
}
if( ! is_product() ) {
return $is_active_sidebar;
}
return false;
}
add_filter( ‘is_active_sidebar’, ‘remove_sidebar’, 10, 2 );
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
Moved to Fixing WordPress, this is not a Developing with WordPress topic.
Please ask Woocommerce questions in that plugin’s support forum.
https://wordpress.org/support/plugin/woocommerce/#new-post