Home › Forums › General Issues › Get all posts that have at least one value in a group › Reply To: Get all posts that have at least one value in a group
Well, yes it would be possible, but it’s probably going to cause performance issues with the query, it might event time out your site. You need to check every value.
group sub field meta keys are as follows
nested group fields
$args = array( 'cat' => 3, 'post_type' => 'post', 'posts_per_page' => $atts['partite'], 'meta_query' => array( 'relation' => 'AND', array( 'key' => 'data_match', 'compare' => '>=', 'value' => date_i18n('Y-m-d H:i'), 'type' => 'DATETIME' ), array( 'relation' => 'OR', array( 'key' => 'meta_key', 'value' => '' 'compare' => '!=' ), // repeat the above array for every field you want to check ), ), 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'data_match', );
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!
© 2023 Advanced Custom Fields.