• Is there a way to hide the actual category that is being blocked from the user, the plugin works great but leaves the categories that are being blocked in the widget on the side bars.

    Thanks

    Robert

Viewing 1 replies (of 1 total)
  • I solve this with the following code:

    /*https://www.themelocation.com/how-to-remove-a-certain-category-from-woocommerce-category-widget/*/
    add_filter( 'woocommerce_product_categories_widget_args', 'woo_product_cat_widget_args' );
    function woo_product_cat_widget_args( $cat_args ) {
    
                    $cat_args['exclude'] = array('102');
    
                    return $cat_args;
    
    }

    The number 102 is the id of that category you want to hide from the widget menu

Viewing 1 replies (of 1 total)
  • The topic ‘Hide Category that has non access’ is closed to new replies.