Creating Category Filter

Create Category Filter

WooCommerce Create Category Filter

You can create a basic category filter using this shortcode [wcats_filter_category]

You can add this shortcode to the page, post, or a custom page template and you will see the category filter will be displayed on the page or post where you place the shortcode.

Exclude Category from Filter

You can exclude some categories from the filter by adding them as attributes to the shortcode.

For example, if we want to get rid of category clothing with the ID of 16 we can add the exclude-category attribute to the shortcode as in this shortcode:

[wcats_filter_category exclude-categories = '16']

You can also add multiple categories separated by a comma and inside the quotes as shown on the shortcode below:

[wcats_filter_category exclude-categories = '12,13,16']

Was this article helpful?

Related Articles

Leave A Comment?