Using Bricks Search and Filter with ACF Relationship

I have a CPT called “Dishes” and a CPT called “Chef” They are in a Bi-directional ACF relationship. In the Dishes Archive page, I want to add a few Search and filter options. Among which I have a Filter-Select field which is supposed to filter Dishes based on the Chef.

In the Filter Select, I selected source as Custom field, Field type as Post and Meta key is chef (from acf_chef) However, it does not render the name of the chef.

Is it cause it’s a relationship field unlike the other fields. How Do I achieve filtering by ACF relationship fields.

Hi Rituraj,
I just tested this, and it works just fine on my end.

Maybe the meta key isn’t correct?

You can find more infos on this here: Query Sort, Filter & Live Search | Bricks Academy

I don’t see an option for Provider in my Filter options. What am I doing wrong?

You can enable it in Bricks » Settings » General:

It’s also documented here: Query Sort, Filter & Live Search | Bricks Academy

After that, the Provider control should show. Choose ACF, then use the dynamic data picker in the Meta key control to select the ACF field, for example {acf_chef} . Then regenerate the filter index under Bricks > Settings > Query filters.

Ah Thank you! works now

1 Like