Filter - Select term count (0) - No Query Loop on page

Hi Bricks Support,

I’m using Filter - Select on the Home page to redirect users to a Service Provider listing page (/service-providers/).

My setup:

  • Custom Post Type: Service Provider (registered via ACF)
  • Custom Taxonomy: Country (registered via ACF, linked to Service Provider only)
  • Filter - Select source: Taxonomy > Country
  • Filter - Submit: Redirect to /service-providers/

The issue is that my Filter - Select Target Query only shows “Posts” because there is no Service Provider query loop on the Home page. This causes the term counts to show (0) for all Country terms.

Is there a way to use Filter - Select with an ACF custom taxonomy on a page that doesn’t have the target query loop, while still showing correct term counts?

Currently the only workaround I found is adding a hidden query loop (Display: None) on the Home page — but this feels like a workaround.

Is there a cleaner solution?

Thank you

Hi @Parnupong ,

Unfortunately, the only way is create a dummy Div and set the correct query loop setting and set display:none for it.

This is needed for the Filter - Select to know what options to show and based on what query. setup.

I have done this and as @itchycode has mentioned, you need to have a query on the page of the filter – just make the query hidden so that it is not seen on the frontend.

Here is a video I did for someone else – maybe it will help.

Video: https://drive.google.com/file/d/1HkcMpyYwuKjAR6LHuQRRyX6HxCxelapf/view?usp=sharing

1 Like