Sort taxonomies shown in the menu
-
Hello,
I am able to limit the number of taxonomies in my menu, however I also want to sort them by number of posts in it.
Here is the example: http://firm-guide.com/cars-manufacturer/audi/
In the submenu, there are 14 items (Abarth-Fiat), but they are sorted alphabetically. I want to show only those 14 with the most articles.Here is the current template code:
$primary_taxonomy = $minisite->get_primary_taxonomy(); $terms = get_terms($primary_taxonomy->slug, array('parent' => 0, 'hide_empty' => 0, 'number' => 14));
Can we somehow implement sortby=number of posts?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Sort taxonomies shown in the menu’ is closed to new replies.