WordPress.org

Ready to get started?Download WordPress

Forums

List Site Contributors
[resolved] Sort by Number of Posts (5 posts)

  1. fredwier
    Member
    Posted 1 year ago #

    Hi,

    I really like this plug-in since I was looking for a way to display the guest writers listed on a page.

    I've managed to change most of it to what I really need.

    I've deleted the alpha sorting and searching on last name, which I don't need. Also made some changes to the css file so it looks better on my template.

    BUT, the thing I'm looking for is: How to sort the contributors on the amount of posts they have published.

    The idea behind it is quite simple, put the number one poster on top, etc. and it will create a kind of competition between the writers (publishers), so they will add more content to be on top of the list.

    Any suggestion ?

    Thanks, Fred

    http://wordpress.org/extend/plugins/list-site-contributors/

  2. mallsop
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks and cool.

    Rough SQL example:
    SELECT users.*, count( posts.user_id ) AS posttotal
    FROM posts LEFT JOIN users ON users.id=posts.user_id
    GROUP BY posts.user_id
    ORDER BY posttotal desc

    Or see the replies here:
    http://wordpress.stackexchange.com/questions/61194/list-users-with-the-most-total-posts-view

  3. fredwier
    Member
    Posted 1 year ago #

    Thanks.

    I understand you're SQL example, now I've to see what is the best place to put it into your code.

    Any suggestion on that ?

  4. mallsop
    Member
    Plugin Author

    Posted 1 year ago #

    You should rewrite the SQL $query in the code around line 344 since you do not want $searchletter but just want all users sorted by top posts. Replace that query with yours.

  5. fredwier
    Member
    Posted 1 year ago #

    thanks, will give it a try

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.