Hi Brajesh,
Using your Profile Tabs pluggin; When looking at another users profile how can I make the Buddypress Home Page always go to the logged in Users profile (as oppossed to the Home Page of the user I’m looking at e.g. mysite/members/loggedinuser/
i.e. I’m logged in as Admin, I look at the Profile of User1, when I click the Home tab I want to take me to my Admin profile Home not User1 Home profile
Also can you tell me what the slug is for the Home tab? the url is (https://incahoot.org/members/admin/)
Hi,
Thank you for using the plugin.The plugin is not able to add different default profile tabs based on user context. It seems a good to feature to explore in future though.
For now, I can provide some code to make it work. Please let me know if it will work for you?
Regards
BrajeshHi Brajesh,
If you can tell me what Slug to use then can’t I achieve my aim by adding [logged-user-profile]
in the Tab Link field?Or are you saying that the Member Home Page Slug is always the dynamic User Name i.e /members/user1/ /members/user2/ /members/user3/ etc?
I think it’s very confusing to the User the way that Buddypress currently works.
i.e. If as User1 I am viewing the Profile Page of another Member, and then if I want to return to my own Home Page, when I select the Member Home Page, I expect to go back to my Home Page, but Buddypress keeps me stuck in the Profile of the other User.Any suggestions how to remedy this is welcome
Hi,
Thank you for sharing.I do agree that showing the front/home does not make sense on other user’s profile.
here is the code that you can put in your bp-custom.php to make it work as you are expecting
function buddydev_set_default_component () { if ( bp_is_my_profile() ) { define ( 'BP_DEFAULT_COMPONENT', 'front' ); } else { define ( 'BP_DEFAULT_COMPONENT', 'profile' ); } } add_action( 'bp_core_setup_globals', 'buddydev_set_default_component' );
This code is based on my blog post from here
https://buddydev.com/changing-default-component-for-buddypress-user-profile-based-on-context/Hope that helps.
Regards
Brajesh
You must be logged in to reply to this topic.