Home › Forums › Add-ons › Repeater Field › Relationship field within repeater returning empty array › Reply To: Relationship field within repeater returning empty array
Following on from this, I found that you need a function for using sub_fields in meta_query
function my_posts_where( $where ) {
$where = str_replace("meta_key = 'driverresults_%", "meta_key LIKE 'driverresults_%", $where);
return $where;
}
add_filter('posts_where', 'my_posts_where');
Hope this helps someone else!
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.