• Resolved Kim Soler

    (@kimso)


    It’s possible to make that some tabs (like invitations) or custom tabs, are only visible for the user in their profile (and maybe the administrator)?

    If another user access to my profile he can’t see some tabs as it’s only useful for me.

    I have found this solution, but if i use it, it hide the tabs also in “Youzify > Profile Settings > Tabs Settings” in WordPress backend.

    • This topic was modified 3 years, 4 months ago by Kim Soler.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Kim Soler

    (@kimso)

    I have found a solution:

    function exclude_tab_if_not_personal_profile() {
    	if ( ! is_admin() ) {
    		if ( ! current_user_can( 'manage_options' ) && ! bp_is_my_profile() ) {
    			bp_core_remove_nav_item( 'tab_slug );
    		}		
    	}
    }
    add_action( 'bp_init', 'exclude_tab_if_not_personal_profile' );

    But it will be a nice feature that Youzify allows to set tabs as public or private in “Youzify > Profile Settings > Tabs Settings”.

    Plugin Support Youzify

    (@kainelabsteam)

    Hello @kimso

    I am glad you have found a solution by yourself. And thank you for your suggestion. Even though this feature is not already in our to-do list yet, but we will consider to add it in the future.

    However, at the moment, you can use snippets or if you need more complex and advance restrictions, you can use our Membership Restrictions plugin >> https://youzify.com/downloads/buddypress-membership-restrictions/

    Best Regards, KaineLabs Team.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Some profile tabs only visible by profile owner’ is closed to new replies.