WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

everyone, is there way to order categories in add/edit post in admin dashboard. The problem is my order must be custom, not by Name or ID. For example:

  • Rumors (id 5)
  • News (id 1)
  • Features (id 7)
  • etc.

    The ideal solution will be to order categories by description. That way in category description field I will put number or letter and categories will order right.

Thank you in advance!

share|improve this question
up vote 2 down vote accepted

Use the get_terms_args hook and modify the orderby argument, like so:

add_filter( 'get_terms_args', 'my_sort_terms', 10, 2 );
function my_sort_terms( $args, $taxonomies ) {

    $args['orderby'] = 'description';

    return $args;

Possible values for this argument are listed in the codex.

share|improve this answer
Thank you for the fast comment. With your code and little edits, now it check the description of the categories and order them like I want. – Dido Kotsev Feb 27 '13 at 15:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.