WordPress.org

Ready to get started?Download WordPress

Forums

WTI Like Post
[resolved] Sort all posts by sum of votes (4 posts)

  1. kevinsteger
    Member
    Posted 1 year ago #

    I would like to sort all of the posts by the sum of all votes.

    The current line in my theme to do this is:

    <?php query_posts($query_string . '&cat='.$query_cats); ?>

    What might that look like? Descending order so the most popular posts are on top.

    Thanks.

    http://wordpress.org/extend/plugins/wti-like-post/

  2. webtechideas
    Member
    Plugin Author

    Posted 1 year ago #

    The above functionality works with post data which refer to post table or post meta table. But the vote counts from the plugin are stored in a separate table. In the next release, I will add the functionality to store the vote counts in the meta table which can be used to sort the posts.

  3. kevinsteger
    Member
    Posted 1 year ago #

    Would it be possible in the mean time to simply run a bit of SQL to select the averages into the wp_postmeta table? If so, could you share what that query might look like?

    Thank you.

  4. webtechideas
    Member
    Plugin Author

    Posted 1 year ago #

    Please drop an email to webtechideas@gmail.com

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.