WP Query group/order by category name
There are a few ways you can do this. The simplest is to just get everything: posts and terms, then use some array_filter magic to group things. Simple example (that will only work with PHP 5.3+): <?php $terms = get_terms(‘your_taxonomy’); $term_ids = array_map(function($t) { return $t->term_id, }, $terms); $posts = get_posts(array( ‘nopaging’ => true, ‘tax_query’ … Read more