Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hitting 50 forum limit? What can I do?


  • jameswordpress
    Participant

    @jameswordpress

    Hi there,

    I’ve just installed bbpress 2.3.2 and I’m looking to display 64 forums. Unfortunately there appears to be a 50 forum display limit. How can I override this limit and show all the 64 forums on the front page?

    James

Viewing 3 replies - 1 through 3 (of 3 total)

  • jameswordpress
    Participant

    @jameswordpress

    I solved this after a quick search of the code. I updated the following file:

    /bbpress/includes/forums/template-tags.php

    updating the line:

    ‘posts_per_page’ => get_option( ‘_bbp_forums_per_page’, 50 ),

    to:

    ‘posts_per_page’ => get_option( ‘_bbp_forums_per_page’, 64 ),


    Robin W
    Moderator

    @robin-w

    tempapte-tags.php was renamed to just template.php

    bbpress/includes/forums/template.php

    However you should be able to use the following filter in your functions file, just amend the 100 to whatever you want
    function bbp_increase-forum-per-page( $args = array() ) {
    $args[‘posts_per_page’] = get_option( ‘_bbp_forums_per_page’, 100 );
    return $args;
    }
    add_filter( ‘bbp_before_has_forums_parse_args’, ‘bbp_increase-forum-per-page’ );


    jamesdoesdesign
    Participant

    @jamesdoesdesign

    I know this is a tad bit old however I happened to stumble on this post while I was looking for a way to increase both the page to 100 posts and the parent page to show all 100 posts as well. The solution above adding to the functions page did not work for me even upon changing it to the proper code.

    I did however find the same solution as jameswordpress did but there are multiple lines.
    to edit so that both the parent forum and the selected forum page to show more than 50 forums.

    To do this edit template.php located in:
    /bbpress/includes/forums/template.php

    Change line 135:
    'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),

    to:
    'posts_per_page' => get_option( '_bbp_forums_per_page', 100 ),

    ———-

    Also changing line 708 should effect the parent page (at least it did for myself):
    'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),

    to:
    'posts_per_page' => get_option( '_bbp_forums_per_page', 100 ),

    You can change the value of 50 to whatever you desire.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.