Hitting 50 forum limit? What can I do?
-
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
-
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 ),
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’ );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.phpChange 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.
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’ );Hello i have the same problem,
how can i solve this problem?
Idk where to paste the fix code.
Thank you for your helpdidnt work to me sadly, i have the still the same problem 🙁
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?
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' );
Thank you.
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
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
🙂
- You must be logged in to reply to this topic.