Trying to display fewer replies for mobile users.
Before getting to the mobile users ran into a problem that the following filter:
function mobile_replies() {
$args['posts_per_page'] = 10;
return $args;
}
add_filter('bbp_before_has_replies_parse_args', 'mobile_replies', 10, 1 );
Works, but, it does not change pagination values in the view loop-single-topic.php problem is with the function bbp_topic_pagination()
For whatever reason it is not affected by filters.
In addition changing the rendering type to “list” with this function affects everything else, but not the pagination show in single forum view.
function bbpress_custom_pagination( $args ) {
$args['type'] = 'list';
$args['prev_text'] = '«';
$args['next_text'] = '»';
return $args;
}
add_filter( 'bbp_topic_pagination', 'bbpress_custom_pagination' );
add_filter( 'bbp_forum_pagination', 'bbpress_custom_pagination' );
add_filter( 'bbp_replies_pagination', 'bbpress_custom_pagination' );
Any thoughts?
Probably adding filters to wrong functions