Title: This plugin breaks sorting using get_terms()
Last modified: August 30, 2016

---

# This plugin breaks sorting using get_terms()

 *  [sabalaskey](https://wordpress.org/support/users/sabalaskey/)
 * (@sabalaskey)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/this-plugin-breaks-sorting-using-get_terms/)
 * This plugin **breaks** the sorting option (and perhaps more) of the WordPress
   built-in function get_terms(), at least for tags as tested. Sorting doesn’t work,
   and the terms always seem to be output in term ID order when using get_terms().
 * [https://wordpress.org/plugins/taxonomy-terms-order/](https://wordpress.org/plugins/taxonomy-terms-order/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Kabitaprocab](https://wordpress.org/support/users/kabitaprocab/)
 * (@kabitaprocab)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/this-plugin-breaks-sorting-using-get_terms/#post-6784285)
 * Hi Sabiaskey,
 * try something like this;
 * $categoriesT = sortCategories(get_categories( $args ));
    function sortCategories(
   $items){ $placeHolder= []; foreach($items as $item){ $placeHolder[$item->name]
   = $item; } ksort($placeHolder); return $placeHolder; }
 * Hope it helps you
    Kabita
 *  Plugin Author [nsp-code](https://wordpress.org/support/users/nsp-code/)
 * (@nsp-code)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/this-plugin-breaks-sorting-using-get_terms/#post-6784286)
 * Try to un-check the Autosort setting. Also make sure you include a ‘orderby’ 
   argument for the get_terms()
 *  Thread Starter [sabalaskey](https://wordpress.org/support/users/sabalaskey/)
 * (@sabalaskey)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/this-plugin-breaks-sorting-using-get_terms/#post-6784289)
 * The point is that the normal plugin behavior breaks WordPress for the display
   of any taxonomy. The new/edit post page also has it’s categories out of order
   because of this plugin, and I certainly won’t hack the core to get around this
   plugin. Setting orderby in other plugin code does not work either. I have deleted
   this plugin as its side effects are fatal.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘This plugin breaks sorting using get_terms()’ is closed to new replies.

 * ![](https://ps.w.org/taxonomy-terms-order/assets/icon-256x256.png?rev=1564412)
 * [Category Order and Taxonomy Terms Order](https://wordpress.org/plugins/taxonomy-terms-order/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/taxonomy-terms-order/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/taxonomy-terms-order/)
 * [Active Topics](https://wordpress.org/support/plugin/taxonomy-terms-order/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/taxonomy-terms-order/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/taxonomy-terms-order/reviews/)

## Tags

 * [categories](https://wordpress.org/support/topic-tag/categories/)
 * [sorting](https://wordpress.org/support/topic-tag/sorting/)
 * [tags](https://wordpress.org/support/topic-tag/tags/)
 * [terms](https://wordpress.org/support/topic-tag/terms/)

 * 3 replies
 * 3 participants
 * Last reply from: [sabalaskey](https://wordpress.org/support/users/sabalaskey/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/this-plugin-breaks-sorting-using-get_terms/#post-6784289)
 * Status: not resolved