You don’t have to edit core files to accomplish this. You can customize the query right in your template.
Study http://codex.wordpress.org/The_Loop and wp-db.php to understand the WP_Query class.
sketloac —
Thanks for you reply, but you’ll have to excuse me a more-or-less just a ol’ database hacker, not a php progammer…
I’ve looked in template-functions-catatory.php and and it looks like catagory id is used as sort order, when displaying posts?
About line# 265:
if (intval($categories)==0){
$sort_column = ‘cat_’.$sort_column;
$query = “
SELECT cat_ID, cat_name, category_nicename, category_description, category_parent
FROM $wpdb->categories
WHERE cat_ID > 0 $exclusions
ORDER BY $sort_column $sort_order”;
$categories = $wpdb->get_results($query);
}
I should probably try it before piping up, but what if you followed the example here
http://codex.wordpress.org/Alphabetizing_Posts
but with &orderby=cat_ID,postID ?