By default WordPress orders custom taxonomies (as tags in this case) by alphabetical order not by the order they were entered in the tag box.
Is anyone aware of a way to show the custom taxonomies in the order they were entered in the post edit screen?
The url in question is: http://granadatheater.com/
The GGW (Goes Good With) artists are currently in alphabetical order and they want it changed so that they are ordered the same way they were entered.
So if the enter it Artist1, Artist3, Artist2 that’s how it should show up on the frontend of the site.
This isn’t possible “out of the box”…
The default ‘orderby’ options are (ascending or descending)
These are all detailed in the codex.
—
That said there are some clever ladies & gents here. If anyone can solve it, one of these guys can i’m sure!
After quite a bit of searching and extensive tests, I found the answer.
Add this code to your theme’s functions.php:
(Credit: this is based on – but improved – http://wordpress.kdari.net/2011/07/listing-tags-in-custom-order.html)
I know this is kind of cheating, but you could always use the Simple Custom Post Order plugin. It’s free, and it allows you to sort Taxonomies in addition to Post Types.
I’ve been struggling to find the answer to alphabetical child terms of a custom taxonomy … I wouldn’t recommend altering core WP files, so here’s what I added to my taxonomy.php file to list out custom taxonomy descriptions, with links to child terms in alphabetical order. Modify to suit your needs, I hope this helps someone out there.
And after to display in web page the good order it could be :
to put “orderby” => “term_group” in your wp_get_post_terms
Example :
“poste” is my custom taxonomy name, put yours