*** Partialy SOVED - I can filter this query with WPGB now.
I build the query with visual GUI (but not with ACF: relationship field that is part of the UI)
Beides that WPGB facet still notify me that there is no content found in facet in the builder - its working fine on front-end.
Hi everyone,
Im banging my head frow a few days. Im trying to filter/sort query from ACF relationship.
I have 2 CPT - Locations and Team, so every team member is in particular location and this relation is made with ACF relationship field (bi-directional). I can query the output in my “Single location template” by 2 methods: Custom PHP query:
return [
‘post_type’ => ‘team’, (my CPT)
‘posts_per_page’ => -1,
‘meta_query’ => array(
array(
‘key’ => ‘location_employee-relationship’, (my relationship fileld)
‘value’ => get_the_id(),
‘compare’ => ‘LIKE’
)
),
‘order’ => ‘ASC’,
‘orderby’=> ‘title’,
];
Also with ACF relationship UI method (which gives a lesser control over the query).
So far so good - I have every team member in the proper location page, but I cannot filter/sort or make pagination trought filters. Tried with bricks builder filtering also with WP Grid Builder neighter one of them can filter the query.