Getting ACF to work with Meta query loop

I have two custom post types. One for “groups” and one for “characters”.

The “people” type have a ACf where one can pick a group page object ( the page name/title) for each person.

On the Group page I wish to display the characters connected to the group.

In the group I have a loop for custom post type “Characters”.


I have set the Meta Query to:
Meta Key = group_name (the field name for page object)
Meta Value = {page_title}
Like

Its however not returning a loop of the character with the group_name == page_title


One thing I am wondering is do the “{page_title}” in the Meta Query referring to the “{page_title}” of the current page or the pages in the loop?



(The Meta Query)

1 Like

Looks like a ACF Relationship makes more sense for your setup.

Bricks supports ACF Relationships in the queries out of the box.

Do you know if its possible to do without using the pro version of ACF?

Yes.

Instead of using a meta query, use post__in parameter via the PHP query editor.

1 Like