WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Zack Tollman v1.1.5

Custom Taxonomy Sort

Custom Taxonomy Sort allows you to explicitly control the sort order of all taxonomy terms.

Custom Taxonomy Sort

The facts

Rating
4★ from 14
Active installs
300+
Price
Free
Last updated
13 Dec 2011
Added
Jul 2011
Requires WP
3.1
Tested up to
WP 3.3.2
Downloads
23,226

Our analysis

AI-assisted

Custom Taxonomy Sort is a WordPress plugin that allows users to define and display taxonomy terms in a custom order. By assigning a numeric value to the 'Order' field for each term, you can control how these terms are sorted, overriding the default sorting by name or ID.

The plugin offers both automatic and manual sorting modes. In automatic mode, terms are sorted based on the specified order, while manual mode allows developers to invoke a custom sort order using specific parameters in their code. This flexibility makes it suitable for users who need precise control over taxonomy term display.

Best for: This plugin is suitable for WordPress users who need to sort taxonomy terms in a specific order.

What it does well

  • Allows custom sorting of taxonomy terms
  • Supports both automatic and manual sorting modes
  • Easy to assign order values through the taxonomy edit screens

Where it falls short

  • Last updated in December 2011, which may raise compatibility concerns
  • Limited active installations may indicate less community support

Verdict

Custom Taxonomy Sort provides a straightforward solution for custom taxonomy ordering, but its age and limited support may be a consideration for potential users.

From the developer

Zack Tollman's own description of Custom Taxonomy Sort, lightly tidied.

Surprisingly, WordPress does not provide a mechanism for sorting taxonomies by a custom defined order. Taxonomies can only be sorted by name or id. Custom Taxonomy Sort allows the average user a mechanism to define and display terms in a specified order. After installing Custom Taxonomy Sort, each taxonomy term will have the ability to have a “tax-order” value associated with it. This order is specified by doing the following:

  1. Go to any taxonomy add or edit screen (e.g., wp-admin/edit-tags.php?taxonomy=category)
  2. Fill in a numeric value for the “Order” field. By default, the order will be ascending, meaning it will sort from low to high (e.g., 1, 2, 3). These values can be added on the Add Taxonomy screen, the Edit Taxonomy screen, or through the Quick Edit panel.
  3. Observe all of your terms automagically being sorted in the order you specified

Custom Taxonomy Sort automatically applies the sort order to all instances in which the terms are displayed. All you need to do is define that order.

Manual Mode

In addition to automatically sorting the terms, Custom Taxonomy Sort allows developers to override the automatic sort to offer finer control over how terms are displayed in different parts of WordPress. Manual mode can be started by changing “Automatic Sort” to “Off” in the Custom Taxonomy Sort Settings page (wp-admin/options-general.php?page=custom-taxonomy-sort-settings). Once “Automatic Sort” is switched to “Off”, the terms will no longer be sorted automatically by the custom order. Instead, the custom sort order can be envoked with a new parameter for the “orderby” argument. Custom Taxonomy Sort allows you to use the following argument to access a custom sorted list of terms using “get_terms”

<?php get_terms('orderby=custom_sort'); ?>

Voila! Now, your terms will only be sorted by the specified order in the places that you want it sorted in this order. All other instances of displaying terms will revert to WordPress’ default of sorting the terms by name. Additionally, you can specifically have the terms sort in ascending (‘ASC’; default; e.g., 1, 2, 3) or descending (‘DESC’; e.g., 3, 2, 1) order by adding the “order” argument.

<?php get_terms('orderby=custom_sort&order=ASC'); ?>

<?php get_terms('orderby=custom_sort&order=DESC'); ?>

Acknowledgements

  • Thanks to Jacob M Goldman for his excellent Simple Term Meta plugin, which made programming the term meta quite simple.
  • Thanks to hydrowire for pointing out a bug fixed in 1.1.1
  • Thanks to “Mosey” for pointing out a bug with a situation in which order did not work for a custom taxonomy
  • Thanks to DUCK__BOY1981 for pointing out a bug where the column values where overridden inappropriately
  • Thanks to @martindj for pointing out a bug where the column value returned incorrectly

Read the full description on the official page →

Tagged as