How to get posts ordered by using their categories?
Before answer I want to say that your code is not really wrong but can be improved: why run 2 queries when you can run only one? caller_get_posts is deprecated, use ignore_sticky_posts, instead get_terms has not title_li nor show_count argument. Moreover $taxonomy is the first argument and do nothing in the $args array (second argument). … Read more