WordPress.org

Forums

Sort authors by ID (5 posts)

  1. Hanenwurger
    Member
    Posted 8 years ago #

    Hello,

    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.

  2. Hanenwurger
    Member
    Posted 8 years ago #

    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.

  3. tsguitar
    Member
    Posted 8 years ago #

    I'm not seeing anything like that in the Codex:
    http://codex.wordpress.org/Template_Tags/wp_list_authors

    But I found this:
    http://wordpress.org/support/topic/70347?replies=3

    And I did a Google search for "sort wp_list_authors." You might want to try the same.

  4. Hanenwurger
    Member
    Posted 8 years ago #

    Thanks for the reply, but it didn't help. I've been googling and trying stuff for hours. None of it works out.

    I've been here:
    http://codex.wordpress.org/wp_list_pages#List_Pages_by_Page_Order

    And yours:
    http://wordpress.org/support/topic/70347?replies=3

    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:
    http://codex.wordpress.org/fr:Marqueurs_de_Modele/the_author_ID :)

    Apparently this isn't such an easy issue after all. However, I thought it was a quite regular request of WP-users.

    More ideas?

  5. tsguitar
    Member
    Posted 8 years ago #

    That change to order by ID should 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.

Topic Closed

This topic has been closed to new replies.

About this Topic