# bbPress: Topics and Replies per Page

> Changes how many topics a forum page lists and how many replies a topic page shows, independent of the bbPress settings screen.

- Type: PHP
- Runs: Run everywhere
- Category: [Users](https://wpide.com/library/category/users/)
- Tags: bbpress, pagination, forums
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/bbpress-topics-replies-per-page/

## Code

```php
if ( ! function_exists( 'bbp_get_topics_per_page' ) ) {
    return;
}

$wpide_bbp_topics_per_page  = 30;
$wpide_bbp_replies_per_page = 25;

add_filter( 'bbp_get_topics_per_page', function () use ( $wpide_bbp_topics_per_page ) {
    return $wpide_bbp_topics_per_page;
} );

add_filter( 'bbp_get_replies_per_page', function () use ( $wpide_bbp_replies_per_page ) {
    return $wpide_bbp_replies_per_page;
} );
```

## Notes

Large numbers make pages heavier; 20 to 50 is a good range.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "bbPress: Topics and Replies per Page" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
