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.

This is a similar question to Sorting for each custom taxonomy, but I don't feel like it was clearly asked or responded to.

I have a custom post type "player" and a custom taxonomy "player_details". The player details consists of things like Height, Weight, Country, Jersey #, etc. I want to add a custom filter / sorting mechanism to my player archives so that you could sort by height, weight, etc.

The built-in query_posts function allows you to sort by date, title, etc, but I don't see how to sort by taxonomy. I realize that if the taxonomy details, were in custom fields, I could sort it that way, but that defeats the purpose of storing it in a custom taxonomy, which is where it should be stored.

Is there a way to do this that I'm not aware of, or is it going to require some deep hacking into Custom Queries? http://codex.wordpress.org/Custom_Queries

share|improve this question

1 Answer 1

up vote 1 down vote accepted

This doesn't seems to be natively possible, even with upcoming improvements in WP 3.1.

[...] That’s not what taxonomies are for. Taxonomies are for grouping, not for ordering by. If you want to order by something, it has to be something in the post itself, not a term in a taxo. Otto

For this kind of data custom fields make much more sense. Instead of "group of people who weight 60kg", it should be "Player A (60kg), Player B (60kg), etc".

Details are by definition individual. Taxonomies are broad generic groups.

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.