Query Posts but only return 1 from a custom taxonomy?
I think that using standard WP_Query you should run 6 different loops, but this is overwhelming. But using a custom $wpdb query you can do the trick… function get_unique_posts_tax( $taxonomy = ‘category’, $number = 10, $cpt=”post”) { global $wpdb; return $wpdb->get_results( $wpdb->prepare( “SELECT p.* FROM $wpdb->term_relationships JOIN $wpdb->term_taxonomy AS tt ON tt.term_taxonomy_id = $wpdb->term_relationships.term_taxonomy_id JOIN … Read more