• Resolved MondaysTruth

    (@mondaystruth)


    Hello!

    I am attempting to setup this plugin on my site so that:

    1. Voting is allowed on only one sub-forum
    2. Replies are sorted by voting on only that sub-forum

    Based upon the plugin FAQ I added these filters:

    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(617864) ) ) {
            $allowed = true;
        } else {
            $allowed = false;
        }
        return $allowed;
    }
    add_filter('sort_bbpress_replies_by_votes', '__return_true');

    And yet, the replies are still sorted chronologically and not by votes.

    However, if I remove the code to allow votes on only the one sub-forum, the replies are sorted by votes.

    I am on version 1.2.8

    Am I doing something wrong?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter MondaysTruth

    (@mondaystruth)

    Still not sure what is going on here, but I am seemingly able to get it to work correctly if I comment out the following like from bbpress-voting.php:

    if(!apply_filters('bbp_voting_allowed_on_forum', true, $bbPress_post_id)) return $args;

    Thread Starter MondaysTruth

    (@mondaystruth)

    After updating to bbpress 2.6, commenting out that line no longer solves the issue. And with the line no longer disabled, I am experiencing the same issues as before. Replies are not sorting by vote.

    Plugin Author natekinkead

    (@natekinkead)

    @mondaystruth, so sorry for the delay in responding to you. I did some testing and was able to replicate the issue you were having. I fixed the bug that was causing it so now it should be working for you.

    Please update to 1.2.9 and let me know if it works now. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sort Replies by Voting Not Working on Single Forum’ is closed to new replies.