Title: Custom Taxonomy Sort
Author: Zack Tollman
Published: <strong>July 4, 2011</strong>
Last modified: December 13, 2011

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/custom-taxonomy-sort.svg)

# Custom Taxonomy Sort

 By [Zack Tollman](https://profiles.wordpress.org/tollmanz/)

[Download](https://downloads.wordpress.org/plugin/custom-taxonomy-sort.1.1.5.zip)

 * [Details](https://wordpress.org/plugins/custom-taxonomy-sort/#description)
 * [Reviews](https://wordpress.org/plugins/custom-taxonomy-sort/#reviews)
 *  [Installation](https://wordpress.org/plugins/custom-taxonomy-sort/#installation)
 * [Development](https://wordpress.org/plugins/custom-taxonomy-sort/#developers)

 [Support](https://wordpress.org/support/plugin/custom-taxonomy-sort/)

## Description

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](https://wordpress.org/extend/plugins/simple-term-meta/),
   which made programming the term meta quite simple.
 * Thanks to hydrowire [for pointing out a bug](https://wordpress.org/support/topic/plugin-custom-taxonomy-sort-error-in-quick-edit-post)
   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

## Screenshots

 * [[
 * Order field in add taxonomy term page
 * [[
 * Order field in Quick Edit
 * [[
 * Order field in edit taxonomy term page
 * [[
 * Settings page

## Installation

 1. Upload the `custom_taxonomy_sort` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## FAQ

  After installation, what do I need to do?

After installing the plugin, all taxonomies will be automatically sorted by your
custom order; however, you need to vist the individual taxonomy term edit pages 
to enter the order of the terms.

  What is “Automatic Sort”

“Automatic Sort” has two states: “On” (default) and “Off”. When “Autmatic Sort” 
is set to “On”, every call to “get_terms” will be sorted by the custom sort order.
In this mode, you do not have to manually add parameters to the “get_terms” function
calls to have the terms sorted by the custom sort order. You can think of the “On”
state as allowing the plugin to do everything for you; all you need to do is tell
it in what order you want the terms to be sorted. On the other hand, if you set “
Automatic Sort” to “Off”, you need to manually send parameters to the “get_terms”
functions in order for the terms to be sorted by the custom sort order. The “Off”
mode is best for developers who want absolute control over every time the terms 
are sorted and displayed.

  What is “Sort Order”

“Sort Order” is the order in which the terms are sorted. “Ascending” will sort the
terms from lowest to highest value (e.g., 1, 2, 3). “Descending” will sort the terms
from highest to lowest value (e.g., 3, 2, 1).

## Reviews

![](https://secure.gravatar.com/avatar/344653ee76e4fc90cb406062cd8a6fc04977571f5eb09af7ae58736249d65f98?
s=60&d=retro&r=g)

### 󠀁[Broken](https://wordpress.org/support/topic/broken-499/)󠁿

 [Ryan Hellyer](https://profiles.wordpress.org/ryanhellyer/) September 3, 2016

Nice idea, but the plugin is quite severely broken and triggers nasty errors. The
problems do go away if you remove the function name clashes which are in the simple-
term-meta.php file. I’m guessing the errors have been occurring since WordPress 
4.4 was released. So based on how long ago that was created, I’m assuming this plugin
will never be updated :/

![](https://secure.gravatar.com/avatar/397ad7273351dd15640cab894ed0c2a1561c6874f2c33cbec880686efe02e3a6?
s=60&d=retro&r=g)

### 󠀁[Fatal Error](https://wordpress.org/support/topic/fatal-error-2007/)󠁿

 [always30](https://profiles.wordpress.org/always30/) September 3, 2016

I used to like this plugin, but it is not compatible with WordPress 4.4.2. I have
to remove it and find the other plugin.

![](https://secure.gravatar.com/avatar/cd2f73fa7e7062007980b23a791e6a0f8876788000ae6fabbec857847652b266?
s=60&d=retro&r=g)

### 󠀁[Broke website](https://wordpress.org/support/topic/broke-website/)󠁿

 [jojones55](https://profiles.wordpress.org/jojones55/) September 3, 2016

Custom Taxonomy Sort broke my website- completely took it offline. I can only assume
it is not compatible anymore with Wordpress and the developer seems to be long gone-
his domain has expired and the plugin hasn’t been updated in years.

 [ Read all 15 reviews ](https://wordpress.org/support/plugin/custom-taxonomy-sort/reviews/)

## Contributors & Developers

“Custom Taxonomy Sort” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Zack Tollman ](https://profiles.wordpress.org/tollmanz/)

[Translate “Custom Taxonomy Sort” into your language.](https://translate.wordpress.org/projects/wp-plugins/custom-taxonomy-sort)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/custom-taxonomy-sort/),
check out the [SVN repository](https://plugins.svn.wordpress.org/custom-taxonomy-sort/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/custom-taxonomy-sort/)
by [RSS](https://plugins.trac.wordpress.org/log/custom-taxonomy-sort/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.1.5

 * Fixed bug with returning an inappropriate value for “column_value”. Thanks to
   @martindj.

#### 1.1.4

 * Fixed situation where the plugin will conflict with other changes to the term
   page columns. Thanks to DUCK__BOY1981.
 * Updated code to comply with WordPress coding standards

#### 1.1.3

 * Fixed a potential situation where the custom sort does not work with “get_the_term_list”.
   Thanks to [@anointed](https://wordpress.org/support/topic/plugin-custom-taxonomy-sort-get_the_term_list-not-using-sort?replies=4)

#### 1.1.2

 * Works for more custom taxonomies in more situations
 * Fixed column alignment
 * Localization fixes
 * Initial groundwork for column sorting

#### 1.1.1

 * Fixed error message displayed in Post, Page, and Custom Post Type Quick Edit 
   screens
 * Javascript and CSS only displays on taxonomy pages

#### 1.1

 * Added full support for Quick Edit

#### 1.0.1

 * Custom Sort is applied in more places (added filter to wp_get_object_terms)
 * Removed full support for WordPress 3.0 (will work in WordPress 3.0, but not in
   all places)

#### 1.0

 * Initial release

## Meta

 *  Version **1.1.5**
 *  Last updated **14 years ago**
 *  Active installations **400+**
 *  WordPress version ** 3.1 or higher **
 *  Tested up to **3.3.2**
 * Tags
 * [category](https://wordpress.org/plugins/tags/category/)[sort](https://wordpress.org/plugins/tags/sort/)
   [taxonomy](https://wordpress.org/plugins/tags/taxonomy/)
 *  [Advanced View](https://wordpress.org/plugins/custom-taxonomy-sort/advanced/)

## Ratings

 4 out of 5 stars.

 *  [  9 5-star reviews     ](https://wordpress.org/support/plugin/custom-taxonomy-sort/reviews/?filter=5)
 *  [  2 4-star reviews     ](https://wordpress.org/support/plugin/custom-taxonomy-sort/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/custom-taxonomy-sort/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/custom-taxonomy-sort/reviews/?filter=2)
 *  [  3 1-star reviews     ](https://wordpress.org/support/plugin/custom-taxonomy-sort/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/custom-taxonomy-sort/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/custom-taxonomy-sort/reviews/)

## Contributors

 *   [ Zack Tollman ](https://profiles.wordpress.org/tollmanz/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/custom-taxonomy-sort/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](http://www.zackdev.com/)