K been a while now and I still can’t come right. Tried using “This is the way you can add the various parameters directly” and “If you want to use multiple parameters it’s sometimes easier to use an array like this”.
Am I editing the right file? If I modify the groups loop; that should limit the pages of all groups right? Can some one give me an example of the modified groups loop limiting something so I can understand where I’m going wrong please.
I’m going to assume you’re editing groups/groups-loop.php, hopefully in your theme and not the core BuddyPress files
Find this bit near the top of the file:
if ( bp_has_groups( bp_ajax_querystring( ‘groups’ ) ) )
And change it to something like:
if ( bp_has_groups( bp_ajax_querystring( ‘groups’ . ‘&per_page=5’ ) ) )
@DJPaul yip its in my theme. Bleh, I can be stupid. Like 3 days ago I added “wp_redirect( get_option(‘siteurl’) . ‘/about’);” to my theme. Kinda the same thing.. Still getting to grasps with php
@DJPaul Ive tried it in my theme and bp-default and can’t come right? Could you please check if its on my side?
Ive cleared my cache and everything I can think of, im pritty sure its not my side?
K got some1 else, anton, to confirm that it doesn’t work. would try play around with the changing the default pagination limit of 20 but that would be in the core I take it..
@r-a-y, is this not maybe a bug or something as Iv’e tried various approaches and cant come right?
You have to fool around with the “bp_dtheme_ajax_querystring” filter.
Boone provided a small tutorial on this:
Modify the code to detect a group and change the per_page variable if you’re on a group.
@boonebgorges ray pointed me in the direction of the “How can I set “Show NewBlogPosts” as default on acitivity-stream?” https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-can-i-set-show-newblogposts-as-default-on-acitivity-stream/?topic_page=1&num=15
and said I must play around with the ajax filter, Iv’e tried using your example suited to groups but I can’t get it working. Could you help me please?