Post Voting Plugin sorting by votes on post listing page

Hello Team,

I am using the Post Voting plugin on my website, the plugin works great, however I would like to add an option to filter the posts on my listing page to sort posts with the highest votes in the today/this week/this month/this year/all time.

Please let me know how the same can be achieved, awaiting your response!

Many Thanks!

  • PC

    Hello @rodvan

    Greetings and thanks for standing by on this one

    You can use the below template tag in your theme to display the popular posts

    Tag: wdpv_popular()
    Attributes:
    int limit - (optional) Show only this many posts. Defaults to 5
    bool network - (optional) Show posts from entire network. Set to true if you wish to display posts from entire network.
    This will display the list of posts with highest number of votes.
    Examples:
    <?php wdpv_popular(); ?> - will display 5 highest rated posts on the current blog.
    <?php wdpv_popular(3); ?> - will display 3 highest rated posts on the current blog.
    <?php wdpv_popular(5, true); ?> - will display 5 highest rated posts on entire network.
    <?php wdpv_popular(10, true); ?> - will display 10 highest rated posts on entire network.
    Note: popular posts will be displayed even if you don't allow voting.

    This however, displays the popular posts and does not have any filter for popular from the day / week / month or year.

    Let me ping our lead developer and seek his suggestion on the same :slight_smile:

    Please note that this might take longer than a usual thread.

    Cheers, PC

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.