It appears that wordpress is sorting it by category ID. The only available parameter is to specify a separator.
Keep in mind, I'm not referring to the "list_cats" tag which has about a dozen a dozen parameters and exists outside the loop. I'm referring to the "the_category" tag which exists inside the loop and is specific for each entry.
Thanks.
wp-includes/template-functions-category.php
Line 10,12,12 are what you are looking for, I think...
WHERE $tablepost2cat.category_id = cat_ID AND $tablepost2cat.post_id = $post->ID
");
change to
WHERE $tablepost2cat.category_id = cat_ID AND $tablepost2cat.post_id = $post->ID ORDER BY category_nicename
");
Should do the trick.
Thanks, but it didn't work.
RyuMaou
Member
Posted 4 years ago #
I got it to work by changing the PRIMARY Index on the wp_categories table in the database. The tricky part was getting all the indexs right.
First, I changed the PRIMARY to a simple index and renamed it.
Next, I changed the cat_name index from Unique to Primary.
Finally, I added the cat_name index, as a Unique index, back into the indexs for this table.
Worked like a charm, but if you're even a little hesitant messing with the SQL database, I don't reccomend trying it.
davidhosier
Member
Posted 3 years ago #
This plugin sorts the category list outputted by the_category() in alphabetical order.