Forum Replies Created
-
In reply to: How many topics and replies to show per page
Hey hey … I can’t go back to edit my code … the second piece of code … the first line has just got one & and should have TWO!
So it should read:
if ( true === $r['hierarchical'] && 1==2) { $walker = new BBP_Walker_Reply; $total_pages = ceil( (int) $walker->get_number_of_root_elements( $bbp->reply_query->posts ) / (int) $replies_per_page ); } else { $total_pages = ceil( (int) $bbp->reply_query->found_posts / (int) $replies_per_page );
And don’t forget this is totally an experiment at my end here … but it’s working well on two local dev installations and our dev server setup 🙂
In reply to: How many topics and replies to show per pageActually, just found out how to “fix” this … but not sure of the impact.
In file bbpress/includes/replies/template.php there’s two places –
Around line 174, I’ve remarked out the IF statement –
// Set posts_per_page value if replies are threaded $replies_per_page = $r['posts_per_page']; /*if ( true === $r['hierarchical'] ) { $r['posts_per_page'] = -1; }*/
And around line 250, I’ve made the IF never be true just to try it out –
if ( true === $r['hierarchical'] & 1==2) { $walker = new BBP_Walker_Reply; $total_pages = ceil( (int) $walker->get_number_of_root_elements( $bbp->reply_query->posts ) / (int) $replies_per_page ); } else { $total_pages = ceil( (int) $bbp->reply_query->found_posts / (int) $replies_per_page );
And that works. But what’s the impact of doing that beyond fixing what I wanted? Am I missing something?
In reply to: How many topics and replies to show per pageGot the same here and just trying to work this out – can recreate exactly the same as yourself, Jgonl and want to get this fixed!