Hide Some Product Categories With Custom Query Using ACF

Share Now

In order to hide some category from a Woocommerce query, we can use ACF to do that.

*Let’s get started.
Simple query to display product categories with thumbnails.

This a simple query to display product categories.
#CODE EXAMPLE

*Now we have to create a ‘TRUE/FALSE’ custom field in ACF for product category:

*It will show an option like this(see image) when you want to add a new product category. This option will also be visible on the old product categories. Just click edit category to find it.

 

*We are all set, Now all we have to do is write the custom query.

#CODE-EXAMPLE

Picture of Nahid Mahamud

Nahid Mahamud

Web Developer | Graphic Designer | WordPress & Woo-commerce Expert