SOLVED: Filtering posts by CPT ACF values

I’m trying to create filters on a CPT (Products) with a Custom Taxonomy (Product Category) and ACF fields (Country and Region) as filterable options.

I’ve tried using the plugin Filter Everything and the category filter works ok (by appending ?product_cat= to the URL) but ACF fields are not working even though the plugin is finding the available values.

Is this possible? What’s the best way of adding filters to CPTs?

Thanks in advance

Hi James,
Sorry for the late reply.

I just tried Filter Everything (free), and you are right. Unfortunately, it does not work with custom fields. Maybe it would be worth trying the Pro version of Filter Everything - perhaps it’s just like Search and Filter, where only custom / ACF fields are supported within the Pro version?

Edit: The free version doesn’t allow for “Filtering Custom WP Queries”. That’s probably the main reason why it’s not working.

I just gave Filter Everything Pro a shot, and there are some issues as well (so I would advise you not to buy it now). I’m not sure if it’s a Bricks or a plugin problem, but I’ll ask our developers next week. However, I’m sure we’ll find a solution to get it working, as it seems an excellent plugin.

Best regards,
timmse

Hi Timmse,

Thanks for the reply.

I had a copy of the Pro version and I managed to get it working by changing the “And what to filter?” setting of the WP query of the page until one worked. In my case “Products query #2” worked.

So if anyone else has the same issue try changing the query numbers until one works.

Regards,
James

Hi James,
very good!

I was wondering anyway why there are 3 queries displayed, although it should actually be only one :thinking: Confused me a bit… but overall, still seems to be a decent plugin! I’ll give it another try when I have some more spare time :slight_smile:

Best regards,
timmse

@james sorry to move this back up, are you still using Filter Everything Pro? Were you able to get pagination and/or, infinite scroll to work with it?

Hi @Mundy . I don’t think I did get it fully working no. I moved to Search & Filter Pro instead in the end.

1 Like