Change Link on Profile Menu
-
Hi I’m looking to change where my ‘Activity’ tab points to when you click. For example, I want to change it from linking to here: http://livinglifefearless.com/members/user/activity/ to linking to here: http://livinglifefearless.com/members/user/activity/my-stream-activity/
Any help?
-
This lets you change the default tabs (tab that is open when clicking on a profile link etc.).
https://buddypress.org/community/groups/buddypress-extended-settings/
my-stream-activity isn’t a core link. Why this url? Your first link IS the users activity.
`
function bp_my_change_tab_slug() {
global $bp;
$bp->bp_nav = $bp->activity->slug . ‘/my-stream-activity’;
}
add_action( ‘bp_init’, ‘bp_my_change_tab_slug’, 999 );
`Well I’m using a custom activity stream provided by Buddydev that pulls all of a users relevant activity into one convenient feed, similar to Facebook. The problem I’m having is that when a user goes to their profile they have to click on the “My Stream” tab again for their checkin option to show up properly in their post form. Not a huge problem but kind of annoying.
Now that I think about it more if there was a way I could change the slug of the Personal subnav to something like “/activity/personal” then change the My Stream subnav slug to just “/activity/” I’m sure that’d solve it. Any way of doing this?
All this is possible, you just need to google and search on how to change tabs.
I figured this out. I couldn’t find a function to use so I just went into bp-activity-loader.php and changed the ‘default_subnav_slug’ => ‘just-me’, to ‘default_subnav_slug’ => ‘my-stream’,
I’ll have to make this change every time I update but it’ll have to do for now.
iamdhunt what do you mean by pulling all of the users feed into one page doesn’t activity stream do the same already?
- The topic ‘Change Link on Profile Menu’ is closed to new replies.