Home › Forums › General Issues › Querying multiple subfields of the same particular repeater row › Reply To: Querying multiple subfields of the same particular repeater row
Hi @charlesr
I believe you can get the head people by using this query:
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'person_department_%_person_department_select', // this should be the first sub-field
'value' => get_the_ID(),
'compare' => '='
),
array(
'key' => 'person_department_%_person_faculty_type', // this should be the second sub-field
'value' => 'head',
'compare' => '='
)
)
And get the supporting people by using this query:
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'person_department_%_person_department_select', // this should be the first sub-field
'value' => get_the_ID(),
'compare' => '='
),
array(
'key' => 'person_department_%_person_faculty_type', // this should be the second sub-field
'value' => 'head',
'compare' => '!='
)
)
If that doesn’t work, could you please open a new ticket and provide temporary credentials to your site here: https://support.advancedcustomfields.com/new-ticket? Don’t forget to provide the link to this thread in the ticket.
Thanks 🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.