Home › Forums › General Issues › WP Query based on whether repeater has rows or not › Reply To: WP Query based on whether repeater has rows or not
The repeater field holds an integer representing the number of rows. The meta query would look something like this
$meta_query = array(
'relation' => 'AND',
array(
'key' => 'your-repeater-field-name',
'compare' => 'EXISTS'
),
array(
'key' => 'your-repeater-field-name',
'value' => 0,
'type' => 'NUMERIC'
'compare' => '>'
),
)
the meta_key exists and it’s value is > 0
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.