• Resolved iboudreau

    (@iboudreau)


    I need to exclude a category from the categories widget. I found a snippet of code to do that. However, it only works on the Shop page. Once you go to a category page, the excluded category shows up again.

    Any thought on how to fix this?

    Here’s the code I’m using:
    add_filter( ‘woocommerce_product_categories_widget_args’, ‘woo_product_cat_widget_args’ );
    function woo_product_cat_widget_args( $cat_args ) {

    $cat_args[‘exclude’] = array(‘000’);

    return $cat_args;

    }

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Exclude Category from Product Categories Widget’ is closed to new replies.