Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add tab to user profile from plugin


  • ShMk
    Participant

    @shmk

    Can anyone point me to a guide/tutorial on how to add a custom tab to the user profile from another plugin?

    I’m looking to show in the new tab a list of objects coming from a custom made plugin.

Viewing 9 replies - 1 through 9 (of 9 total)

  • shanebp
    Moderator

    @shanebp


    ShMk
    Participant

    @shmk

    Thanks a lot!

    In the example the tabs content is hardcoded, is it possible to retrieve the “currently shown user profile id” inside the XYZ_screen_content() function?


    shanebp
    Moderator

    @shanebp

    bp_displayed_user_id()


    ShMk
    Participant

    @shmk

    Thanks,
    I had to change the way ‘screen_function’ and ‘add_action’ are linked to their functions because I’m working in a Class, then all is working as expected 🙂


    ShMk
    Participant

    @shmk

    A new question strictly related with my previous one:
    using the above methods I’ve been able to add a tab/subtab to the user profile that display the content inside the profile, under the tabs.
    But is it possible to insert in the tabs a “direct link” to an external page?
    Something not like “http://mywebsite.tld/user/username/slug” but “http://anyurlhere.tld”?


    ShMk
    Participant

    @shmk

    I’ve found a solution directly adding the HTML using the ‘bp_member_options_nav’ hook.


    sensibleplugins
    Participant

    @sensibleplugins

    There is now a plugin that allows you to easily add a new tab to the user profile page: https://wordpress.org/plugins/buddypress-custom-profile-menu/

    Full disclosure: I am the plugin author 🙂


    mysticsofthenight
    Participant

    @mysticsofthenight

    BuddyPress custom profile plugin doesn’t work. It doesn’t do anything at all. All the profile section shows is “Base Name” and a field to enter your name and that’s it. Users’s can’t add their bio to their profile.


    mysticsofthenight
    Participant

    @mysticsofthenight

    My apologies to all. I found out how to fix the problem of not being able to add additional tabs to the profile section for users on a main social site empowered by BuddyPress. You have to go to WordPress admin > Users > Profile fields and you can add any fields to the profile section of your social site website that is empowered by BuddyPress. This allows users to add their name, bio, location, work, education and anything else you want them to be able to add in their profile on your social site empowered by BuddyPress instead of in the backend of the wordpress page. Also, you can install a plugin that prevents your users from clicking on the dashboard link in top left toolbar and going to backend profile of WordPress, which is called Remove Dashboard access Version 1.1.3 | By Drew Jaynes and can be found at https://wordpress.org/plugins/remove-dashboard-access-for-non-admins/ That said, problem solved and may my solution fix this same users not being able to add more fields in their profile section on a main social website powered by BuddyPress that other admins encounter permanently.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.