I know i’ve seen this topic before…I just did a search https://buddypress.org/search/?f=default+activity
i read the other topics.. no solution there…
You can thank Boone for the answer below. Replace scope=groups with what ever filter you’d like to apply.
Changing the tabs is an appearance issue; it doesn’t have any effect on the activity items shown.
Try the following function in your functions.php or bp-custom.php. The logic is this: If the query string is empty (as it is when you first visit the activity page) and there is nothing in the POST variable that says which scope to show (that is, the user has not clicked ‘All Activity’ and thus set an AJAX request into effect), then show only my group content.
`function bbg_my_groups_activity_default( $qs ) {
if ( empty( $qs ) && empty( $_POST ) ) {
$qs = ‘scope=groups’;
}
return $qs;
}
add_filter( ‘bp_ajax_querystring’, ‘bbg_my_groups_activity_default’, 999 );`
I actually got this work with the following modifications
function bbg_my_groups_activity_default( $qs ) {
if ( empty( $qs ) && empty( $_POST ) ) {
$qs = ‘action=activity_update’;
}
return $qs;
}
add_filter( ‘bp_ajax_querystring’, ‘bbg_my_groups_activity_default’, 999 );
the only problem is that when you click the “read more” button at the bottom of the activity stream it loads all the crap… “new memebers, friendship, etc…” any idea on how to stop that from happening when someone clicks the “read more” ?
Oh this is very close to answering a big need (setting the default view to the “My”s on every view). Does anyone know of a place where I can look up all of the action= arguments or the scope=arguments?
Edit: I’m assuming that’s what is being passed to bp_ajax_querystring – is it page slug? my-groups does not work for scope Alternatively, if someone knows where I can find some reference for bp_ajax_querystring, that’d be great too. The lack of documentation is killing me on this project
Hi, I was looking to do the same thing. Replace the default ‘Show Everything’ to ‘Show Updates.’ Anyone ever get this working 100%??
hi,
maybe you can find a solution here
Activity Loop
i had this
<?php if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ) ) ) : ?>
in …/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/activity-loop.php
i changed this way
<?php if ( bp_has_activities( bp_ajax_querystring( ‘object=status’ ) ) ) : ?>
it works!
sorry for my bad english
bye