Home › Forums › Support › Right-sidebar and woocommerce subcategoryes › Reply To: Right-sidebar and woocommerce subcategoryes
January 15, 2016 at 11:19 am
#165958
Lead Developer
Lead Developer
I think you can use the product_category() conditional: https://docs.woothemes.com/document/conditional-tags/
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 'both-sidebars';
if ( is_product_category( 'shirts' ) )
return 'no-sidebar';
// Or else, set the regular layout
return $layout;
}
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development