Can you please tell me how to implement in WooCommerce on the categories page and in the product different templates? I need the sidebar to have a sidebar on the categories page, but it was not in the product ... How to do this? I would be grateful for the help.
1 answer
It all depends on the theme that sidebar displays. Implementation options can be very much. In the standard twentyseventeen theme, you can disable the output of the dynamic sidebar through the filter:
function is_active_sidebar_filter( $is_active_sidebar, $index ) { if ( ( 'sidebar-1' === $index ) && is_product() ) { return false; } return $is_active_sidebar; } add_filter( 'is_active_sidebar', 'is_active_sidebar_filter', 10, 2 ); The code is working, checked on the test site.
|