Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a custom taxonomy registered for my custom post type. I need to make it possible for a user to specify the order in which the taxonomy terms should appear (something like menu order for pages). Then when displaying the taxonomy terms on the site I will use the specified custom order to order them.

What is the best way to do it? Is there any plugin for it?

Many thanks, Dasha

share|improve this question
1  
Just a heads up Dasha, your accept rate is very low and might not encourage people to answer. –  Wyck May 6 '11 at 14:59
    
@Wyck, thanks, I will have a look into it. –  dashaluna May 9 '11 at 15:36
    
I have found these lines 'sort' => true, 'args' => array('orderby' => 'term_order') when registering a custom taxonomy at the codex. However, it's not really explained how it works and how it affects a custom taxonomy. Does anyone know? Thank you :) –  dashaluna May 9 '11 at 15:38
    
I've added an answer here, I've made a plugin that does exactly this -- and it does it pretty well. –  Drew Gourley Sep 22 '11 at 15:10

6 Answers 6

Still looking myself.

After some exploring I decided to use the Term Menu Order plugin by @jameslafferty. This will add menu_order to the terms table and can be used across taxonomies and templates. @TheDeadMedic seems to have enhanced this functionality over here, discussing a similar issue.

share|improve this answer

I just released a plugin to handle this issue. It's up-to-date and I like to think it does things the right way. You can find it here: http://wordpress.org/extend/plugins/custom-taxonomy-sort/.

After installing, you just need to enter the order for the taxonomy terms and your terms will be magically sorted. Please give any feedback that you might have!

share|improve this answer
    
thanks a lot! :) Gonna check it out this week. –  dashaluna Jul 5 '11 at 7:32

I have a solution to this: http://wordpress.org/extend/plugins/order-up-custom-taxonomy-order/

Order 'em up, set it to auto-sort, knock 'em down!

share|improve this answer
    
Hey, thanks a lot for the plugin - just been testing it and realized that I've got my own SQL query that pulls the terms, I guess I would need to add there a SORT BY clause now? What field does it store the position in? Thanks. –  dashaluna Sep 30 '11 at 9:20
    
Drew, I've also posted a comment with some questions on your plugin's page drewgourley.com/order-up-custom-ordering-for-wordpress –  dashaluna Sep 30 '11 at 9:39

I'm looking for a solution for the same issue.

@dashaluna the bit of code you found only works for taxonomies that are registered like "tags", tho in a non hierarchical order and sorts the taxonomy terms by entry order. ( that's what i discovered, not 100% sure ).

I personally use a custom field for the terms ( provided via WooThemes Content Builder - can be done with other free plugins ) and to also use that in the front-end to sort terms ordering i will be using a plain MySQL query joining the appropriate taxonomy tables with the additional one for terms meta ( custom fields ) - It 'll probably work for every situation but a raw query would be slower than built-in WP Queries.

share|improve this answer

I came across the My Category Order plugin. However this is for the WP native categories and it adds 'My Category Order' link to the Posts menu where you can drag and drop categories in a required order.

It can be changed (text search and replace) for a custom taxonomy.

Nevertheless, would be nice to have a dedicated plugin for custom taxonomy terms reorder or know how to code it. I would be grateful for any tips.

Thanks!

share|improve this answer
up vote 0 down vote accepted

Thank you everyone for advice and apologies, I haven't realised that I hadn't have selected the answer for this question.

Since I've asked it, I came across Category Order and Taxonomy Terms Order plugin. I mainly use this plugin for ordering.

share|improve this answer

Your Answer

 
discard

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.