Sort authors by ID
My question is simple:
How can I sort the list of authors by the author ID?
I want to list the authors by the chronologic order they were recruited for writing.
I’ve tried several things, among others with
<?php wp_list_authors('sort_column=the_author_ID'); ?>
… with no result.
Apparently this question is harder than I thought, isn’t it?
I’m talking about the list of authors in the sidebar, in case that wasn’t so clear in the first post. The mentioned line was tried in the sidebar itself.
I’m not seeing anything like that in the Codex:
But I found this:
And I did a Google search for “sort wp_list_authors.” You might want to try the same.
Thanks for the reply, but it didn’t help. I’ve been googling and trying stuff for hours. None of it works out.
I thought I’d find it there, but it didn’t have any result. I have the slight impression that this template-functions-author.php doens’t really respond to what I modify in it.
I’ve even been looking on French pages:
Apparently this isn’t such an easy issue after all. However, I thought it was a quite regular request of WP-users.
That change to
order by IDshould do exactly what you want. If your blog isn’t responding, I suspect you’re modifying the wrong line. I don’t have multiple authors anywhere so I can’t test this myself, but that code in template-functions-author.php is the MySQL call to pull that content out. That’s where you want to make a change. Try deleting that
order by display_name(what that line is by default) and see if that makes any difference.
Of course, the trouble with all this is that it makes it a hassle to update your install of WP in the future. But let’s get it working first, then see how we can take the modification out of the core files.
- The topic ‘Sort authors by ID’ is closed to new replies.