Home › Forums › General Issues › Looping through a group with a nested repeater › Reply To: Looping through a group with a nested repeater
Update: I have started to shift toward adding meta_query to my args and then put an if $count is greater than the query. My issue is that I can only get the $count to add up how many posts are in the CPT, instead of what matches the query. Have I gone the wrong way?
Here is the new code I am trying to make work:
$args = array(
'posts_per_page' => 500,
'orderby' => 'meta_value',
'order' => 'DESC',
'meta_query' =>
array(
'relation' => 'AND',
array(
'key' => 'book_videos', // group
'compare' => 'EXISTS'
),
array(
'key' => 'book_videos_bk_videos', // group + nested repeater --> I want to add another array here that adds in a subfield of the nested repeater but it just doesn't work
'compare' => 'EXISTS'
),
),
'post_type' => 'books',
'post_status' => 'publish',
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.