You can use the scope
argument for that.
Try this in your theme > functions.php or in bp-custom.php
function bp_activities_user_friends_scope( $retval ) {
if ( bp_is_activity_directory() ) {
$retval['scope'] = 'friends';
}
return $retval;
}
add_filter( 'bp_after_has_activities_parse_args', 'bp_activities_user_friends_scope' );
hi,
I thank you for youre response. I’m new in to this. I searched information about bp-custom.php.
If i understand well, this is not an map that is already there. I need to make a map with an editor and place it on the server with a program like: filezilla?
thank you, have a nice day
Yes, you need to create bp-custom.php
and place it on your server – as explained in the link I provided.
Dear,
I tried but it didn’t work. I made a bp-custom.php map in: wp-content/plugins/bp-custom.php –> In the map bp-custom.php i placed a file bp-custom.php
I used notedpadd ++ as a editor to place the code you give me and copied it to my server. Once installed, i can’t enter my site. It gives an error:
Warning: require …
Fatal error: require(): Failed opening .. class-buddypress.php on line 226
This looks strange, cause the code filled in notepadd ++ goes only to line 11.
I filled it in as:
<?php
function bp_activities_user_friends_scope( $retval ) {
if ( bp_is_activity_directory() ) {
$retval[‘scope’] = ‘friends’;
}
return $retval;
}
add_filter( ‘bp_after_has_activities_parse_args’, ‘bp_activities_user_friends_scope’ );
?>
did I do something wrong?
Big thank for youre help
I made a bp-custom.php map in: wp-content/plugins/bp-custom.php –> In the map bp-custom.php i placed a file bp-custom.php
By map
you mean a directory ?
If so – delete the directory called bp-custom.php
Put your bp-custom.php file in the plugins directory: wp-content/plugins/
Dear, my apoligize,
I understand now that i shouldn’t have made a map, but just a file in wp-content/plugins/
I did as you proposed and it worked well! Thank you very much for youre advise and helping!
Many blessings