ACF – Retrieve custom taxonomy from a relationship field

I managed to solve my issue by looping through a get_the_terms() function. In my case, I’ve also created a shortcode. function display_taxonomy() { $prognoses = get_field(‘prognosis’); ob_start(); if( $prognoses ): foreach( $prognoses as $prognosis ): $terms = get_the_terms( $prognosis->ID , ‘my_custom_taxonomy’ ); foreach ( $terms as $term ): echo $term->name; endforeach; endforeach; endif; return ob_get_clean(); … Read more

order the meta query results by 2 custom fields

You forgot to use relation in meta_query . I think this will work: $args = array( ‘post_type’ => ‘brewery’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1, ‘meta_query’ => array( ‘relation’ => ‘AND’, ‘review_rating_meta’ => array( ‘key’ => ‘review_rating’, ), ‘reveiw_count_meta’ => array( ‘key’ => ‘reveiw_count’, ), ), ‘orderby’ => array( ‘review_rating_meta’ => ‘DESC’, ‘reveiw_count_meta’ => ‘DESC’, … Read more