So no one can help me with this? I know that the Jetpack mobile theme restricts the blog posts to 5 per page (even though it is set to 10 in the WordPress settings, which is what I want for my desktop theme), so I assume there must be some kind of hook I can use to do the same with bbPress posts.
Sorry, there are only a very few of us who volunteer to help here, this is free software with free unpaid support and we give what time we are able.
It is doable, but I know of nothing that does it, let me do some digging when I get a moment.
Thank you so much for your help Robin – I appreciate it.
so try this code, amending the numbers to what you want
if (wp_is_mobile()) {
add_filter ('bbp_get_topics_per_page', 'mobile_topics_per_page') ;
add_filter ('bbp_get_replies_per_page', 'mobile_replies_per_page') ;
}
function mobile_topics_per_page () {
return '4' ;
}
function mobile_replies_per_page () {
return '3' ;
}
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
I would add that the replies but doesn’t work with threaded replies, but I am not a fan of threaded replies !
If you are using them come back, but from a quick inspection, it looks like the ‘replies per page’ in the dashboard>settings>forums>replies per page doesn’t work for threaded replies in all cases.
Thank you so much again for your help Robin – this is very helpful information.
Oh and yes, I don’t use threaded replies either.
great – glad to have helped