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 13 replies - 1 through 13 (of 13 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.


    shibaa987
    Participant

    @shibaa987

    Well, the above function also worked but needed some modification.

    Here is the code snippet that actually worked:

    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’ );


    andreasyeah
    Participant

    @andreasyeah

    Hello i have the same problem,

    how can i solve this problem?
    Idk where to paste the fix code.
    Thank you for your help


    Robin W
    Moderator

    @robin-w

    use

    Code Snippets

    and paste it in there


    andreasyeah
    Participant

    @andreasyeah

    didnt work to me sadly, i have the still the same problem 🙁


    user8472
    Participant

    @user8472

    What should this be called? – For some reason setting a limit of 50…. and then there is no real solution to the problem. What should that be called? What is the name for it?


    webcreations907
    Participant

    @webcreations907

    The below code should set it to unlimited number of forums, either paste the code into your functions.php file within your theme, or use the Code Snippets plugin listed above.

    
    
    if(!function_exists('bbp_increase_forum_display_count')){
    	function bbp_increase_forum_display_count( $args = array() ){
    		$args['posts_per_page'] = -1;
    		return $args;
    	}
    }
    add_filter( 'bbp_after_has_forums_parse_args', 'bbp_increase_forum_display_count' );
    
    

    user8472
    Participant

    @user8472

    Thank you.


    Clivesmith
    Participant

    @clivesmith

    Hi,
    I use functionfrom Robin,
    function bbp_increase_subforums_per_page( $args = array() ) {
    $args[‘posts_per_page’] = 100 ;
    return $args;
    }
    add_filter( ‘bbp_before_forum_get_subforums_parse_args’, ‘bbp_increase_subforums_per_page’ );

    Any ideas how I can increase the number of topics per page ?, it is set at 100 I need to increase this to 150, please


    Clivesmith
    Participant

    @clivesmith

    Hi, Sorry I found it it is

    function bbp_increase_topic_per_page( $args = array() ) {
    $args[‘posts_per_page’] = 150 ;
    return $args;
    }
    add_filter( ‘bbp_before_has_topics_parse_args’, ‘bbp_increase_topic_per_page’ );

    If anyone needs it


    Robin W
    Moderator

    @robin-w

    🙂

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