I was using Generate Press 1.3.2.1 in a woocommerce store and the woocommerce search results page didn’t have a sidebar.
I updated to 1.3.2.3 and the sidebar is showed in woocommerce search results.
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;
}
The sidebar seems to dissapear but the width of the div has this class applied:
.masonry .grid-sizer, .masonry .masonry-post {
width: 33.333%;
}
so it doesn’t fill the full width. I suppose I can change it using css but is there another workaround?
Ah, you may have to disable masonry for WooCommerce.
add_filter('generate_blog_masonry','generate_blog_woocommerce_masonry');
function generate_blog_woocommerce_masonry()
{
// Disable in WooCommerce
if ( is_woocommerce() )
return 'false';
// Check if blog
if ( is_home() )
return 'true';
// Otherwise, disable it
return 'false';
}