Home › Forums › Add-ons › Flexible Content Field › Reverse query a repeater field within flexible content? › Reply To: Reverse query a repeater field within flexible content?
I actually solved this! I didn’t do it the way I thought it would be, but I got it to work the way I needed it to work.
function workshop_dates( $where ) {
$where = str_replace("meta_key = 'workshop_details_%", "meta_key LIKE 'workshop_details_%", $where);
return $where;
}
add_filter('posts_where', 'workshop_dates');
// vars
$date_now = date('Y-m-d H:i:s');
// args
$args = array(
'post_type' => 'page',
//'posts_per_page' => 2,
'meta_query' => array(
array(
'key' => 'workshop_details',
'compare' => '>',
'value' => 0
)
)
);
I basically pulled all of the fields, and once I had them, I displayed the nested repeater fields.
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.