Skip to:
Content
Pages
Categories
Search
Top
Bottom

how to create a my profile menu item


  • prakharmonga
    Participant

    @prakharmonga

    i want to add a my profile link in my menu
    so that user can go to his profile (for frontend only) while looking at other
    member’s profile

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

  • prakharmonga
    Participant

    @prakharmonga

    i think i posted in the wrong forum
    sorry


    Venutius
    Moderator

    @venutius

    The BuddyPress specific Menu items, including the link to the members profile page are now only avaialble from the menu options in Customize, you need to go there to find the menu item you need


    danbp
    Participant

    @danbp

    [Moved to another forum by OP request]

    You can try this snippet which will add the link to main menu (aside About, Home etc):

    function my_nav_menu_profile_link($menu) {      
            if (!is_user_logged_in())
                    return $menu;
            else
                    $profilelink = '<li><a href="' . bp_loggedin_user_domain( '/' ) . '">' . __('My Awesome Profile') . '</a></li>';
                    $menu = $menu . $profilelink;
                    return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );

    Another way to do this is explained in this topic.


    prakharmonga
    Participant

    @prakharmonga

    thanx for the solution.
    it appeared using screen option
    but i have another problem
    i am using wp multisite and the structure is
    subdomain.maindomain/subsite
    it is appearing on the main site from the screen options
    i have buddypress network activated from the network menu
    but it is not appearing on screen options in sub sites
    i want to have My Profile in all my sub sites menu


    danbp
    Participant

    @danbp

    Sorry, whithout the code snippet you use to add your menu, it is not possible to answer correctly.


    prakharmonga
    Participant

    @prakharmonga

    i didn’t use the code snippet
    i added it through screen options then bp links appeared as pages
    and i added them to menu on the main site


    danbp
    Participant

    @danbp

    And is it working for you now ?

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