How to query custom post then display sections by meta value
I would recommend executing two separate queries, each one differing from the other via a meta_query against your post custom meta key value. $current_query_args = array( ‘post_type’ => ‘recipient’, ‘meta_query’ => array( array( ‘key’ => ‘yes_current’, ‘value’ => ‘on’, ‘compare’ => ‘=’ ) ) ); $current_query = new WP_Query( $current_query_args ); if ( $current_query->have_posts() ) … Read more