[wp-hackers] get_the_term_list terms order
Haluk Karamete
halukkaramete at gmail.com
Wed Feb 20 00:49:43 UTC 2013
Say you got this in your code;
$post_tag_term_list = get_the_term_list( $post->ID, 'post_tag', "", "
* ", "" );
well, $post_tag_term_list terms would be in an alphabetical order;
such as in "adam", "george", "zach".
I may be wrong in my following assumption, but getting the order in
the original way ( the way it was entered at the time of publishing
that post ) may come in handy from time to time.
I'm assuming that naturally, you would enter the tags for your post
starting from the most relevant item to the least. That's just how
mind works I think.
So, if the post were to be mostly about "zach", but it also mentions
"george" and "adam", I probably would tag the post starting with
"zach", automatically, then I threw the other ones in as "george",
"adam" or as "adam, "george". ( I may not be consistent in the order
for the less significant items in the post ( "george" and "adam" ),
but probably, I would almost always start with the biggest ticket item
("zach") . See what I mean? Maybe I am just wrong but could someone
give me a hint as to how I can get the get_the_term_list to give me
the list in the term_relationships id order?
My goal is to pick the main tag out of the post, and then do things with it.
More information about the wp-hackers
mailing list