Hi,
Before deciding to redirect from sitewide activity to user’s own activity you should know the difference between them and then decide.
– On the sitewide page a user can see activity from whole site(including his won/friends/his groups and any non related member of the site)
– On profile, a user can see his/her won activity as well as friends/groups etc but activities of group they are not member of or activity of users they are not friends with, won’t be visible,
If you still want to redirect from sitewide activity to user’s own activity, You may use the following code.
/**
* Redirect logged in user's from sitewide activity page to profile activity.
*/
function buddydev_redirect_sitewide_activity_to_profile_activity() {
if ( is_user_logged_in() && bp_is_activity_directory() ) {
bp_core_redirect( bp_loggedin_user_domain() . bp_get_activity_slug() );
}
}
add_action( 'bp_template_redirect', 'buddydev_redirect_sitewide_activity_to_profile_activity' );
PS:- you can put the code in your theme’s functions.php or in the wp-content/plugins/bp-custom.php
Best Regards
Brajesh
Thanks for this Brajesh – hmm yes I did consider keeping it up but I don’t like that there’s no profile header on it, is there a way to add the logged in user’s cover image header and profile nav to the sitewide activity page?
I think I read once that the code that delivers the profile cover image / avatar / navs is dependent upon being situated in the member component or something similar, so it wasn’t just a case of me changing displayed user to logged in user etc, and so would be tricky to relocate, is that right?
It would be great to know if it was poss to add the cover image header for the logged in user to the top of the sitewide activity page, any help or pointers much appreciated 🙂