Support » Plugin: bbPress Voting » Only Sort Certain Forum’s Replies by Voting Score

  • Resolved samtime


    First of all, amazing plugin. I use it on my site for users to post and vote on memes, like our own little Reddit.

    Wondering if there’s a way though to only set certain forums to have replies sorted by their voting score.

    Because I only use one forum for posting and voting memes, using your code here:

    add_filter( 'bbp_voting_allowed_on_forum', 'allowed_voting_forums', 10, 2 );
    function allowed_voting_forums( $allowed, $forum_id ) {
        if( in_array( $forum_id, array(123, 124, 125) ) ) {
            $allowed = true;
        } else {
            $allowed = false;
        return $allowed;

    And sorted those posts by their voting score:

    add_filter('sort_bbpress_replies_by_votes', '__return_true');

    However, this also jumbled the order some of the replies in other forums that have no voting score enabled.

    IF it’s possible to limit the custom sorting to certain forums, that would be awesome. Maybe a possible update if it can’t be done now.

    Thank you,

Viewing 1 replies (of 1 total)
  • Plugin Author natekinkead


    @samtime, I just released a new version that should fix that issue for you. Please update and give it a try.

    = 1.2.5 =
    * Don’t sort by votes when voting is not allowed on that forum.

Viewing 1 replies (of 1 total)
  • The topic ‘Only Sort Certain Forum’s Replies by Voting Score’ is closed to new replies.