Skip to:
Content
Pages
Categories
Search
Top
Bottom

menu with bp_nav_menu()


  • lynnapp
    Participant

    @lynnapp

    in my child theme I have added this to the members/single/parts/item-nav

            <label class="toggle" for="toggle">☰ <span>Menu</span></label>
            <input class="toggle" id="toggle" type="checkbox">
    
    <nav class="<?php bp_nouveau_single_item_nav_classes(); ?>" id="object-nav" role="navigation" aria-label="<?php esc_attr_e( 'Member menu', 'buddypress' ); ?>">
    	<?php if ( bp_nouveau_has_nav( array( 'type' => 'primary' ) ) ) : ?>
    		<ul>
       <?php bp_nav_menu(); ?> 
    		</ul>
    	<?php endif; ?>
    </nav>
     

    I have removed the submenu form all the other page fronts
    So this is the problem

    1. The loop for the sub-menus is
    a. Putting the profile menu items under a new submenu under settings
    (this submenu )

    	<ul class="sub-menu">
    		<li id="public-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/profile/#item-header-content">View</a></li>
    		<li id="edit-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/profile/edit/#item-header-content">Edit</a></li>
    		<li id="change-avatar-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/profile/change-avatar/#item-header-content">Change Profile Photo</a></li>
    		<li id="change-cover-image-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/profile/change-cover-image/#item-header-content">Change Cover Image</a></li>
    	</ul>

    Here is the source codes for the menus while looking at looking at my own profile not as admin.

    So I was wondering if the walker argument could help with this, but I could not find any documentation on that part.
    Could you point me to where or how to get the profile submenu items under the profile li and not as a sub sub of settings?

    <nav class="main-navs no-ajax bp-navs single-screen-navs user-nav-tabs tabbed-links horizontal users-nav" id="object-nav" role="navigation" aria-label="Member menu">
    		<ul>
       <div class="menu-bp-container"><ul id="menu-bp" class="menu"><li id="front-personal-li" class="menu-parent"><a href="http://localhost/wordpress/members/athlete-lynn/front/#item-header-content">Home</a>
    <ul class="sub-menu">
    	<li id="public-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/front/#item-header-content">View</a></li>
    </ul>
    </li>
    <li id="xprofile-personal-li" class="menu-parent"><a href="http://localhost/wordpress/members/athlete-lynn/profile/#item-header-content">Profile</a></li>
    <li id="activity-personal-li" class="menu-parent"><a href="http://localhost/wordpress/members/athlete-lynn/activity/#item-header-content">Activity</a>
    <ul class="sub-menu">
    	<li id="just-me-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/activity/#item-header-content">Personal</a></li>
    	<li id="activity-mentions-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/activity/mentions/#item-header-content">Mentions</a></li>
    	<li id="activity-favs-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/activity/favorites/#item-header-content">Favorites</a></li>
    	<li id="activity-friends-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/activity/friends/#item-header-content">Friends</a></li>
    	<li id="activity-groups-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/activity/groups/#item-header-content">Groups</a></li>
    </ul>
    </li>
    <li id="friends-personal-li" class="menu-parent"><a href="http://localhost/wordpress/members/athlete-lynn/friends/#item-header-content">Friends <span class="count" style="cursor: pointer;">1</span></a>
    <ul class="sub-menu">
    	<li id="friends-my-friends-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/friends/#item-header-content">Friendships</a></li>
    	<li id="requests-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/friends/requests/#item-header-content">Requests</a></li>
    </ul>
    </li>
    <li id="notifications-personal-li" class="menu-parent"><a href="http://localhost/wordpress/members/athlete-lynn/notifications/#item-header-content">Notifications <span class="count" style="cursor: pointer;">1</span></a>
    <ul class="sub-menu">
    	<li id="notifications-my-notifications-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/notifications/#item-header-content">Unread</a></li>
    	<li id="read-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/notifications/read/#item-header-content">Read</a></li>
    </ul>
    </li>
    <li id="invite-anyone-personal-li" class="menu-parent"><a href="http://localhost/wordpress/members/athlete-lynn/invite-anyone/#item-header-content">Send Invites</a>
    <ul class="sub-menu">
    	<li id="invite-new-members-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/invite-anyone/#item-header-content">Invite New Members</a></li>
    	<li id="sent-invites-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/invite-anyone/sent-invites/#item-header-content">Sent Invites</a></li>
    </ul>
    </li>
    <li id="settings-personal-li" class="menu-parent current-menu-parent"><a href="http://localhost/wordpress/members/athlete-lynn/settings/#item-header-content">Settings</a>
    <ul class="sub-menu">
    	<li id="general-personal-li" class="menu-child current-menu-item"><a href="http://localhost/wordpress/members/athlete-lynn/settings/#item-header-content">General</a></li>
    	<li id="notifications-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/settings/notifications/#item-header-content">Email</a></li>
    	<li id="profile-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/settings/profile/#item-header-content">Profile Visibility</a>
    	<ul class="sub-menu">
    		<li id="public-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/profile/#item-header-content">View</a></li>
    		<li id="edit-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/profile/edit/#item-header-content">Edit</a></li>
    		<li id="change-avatar-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/profile/change-avatar/#item-header-content">Change Profile Photo</a></li>
    		<li id="change-cover-image-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/profile/change-cover-image/#item-header-content">Change Cover Image</a></li>
    	</ul>
    </li>
    	<li id="invites-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/settings/invites/#item-header-content">Group Invites</a></li>
    	<li id="data-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/settings/data/#item-header-content">Export Data</a></li>
    	<li id="delete-account-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/settings/delete-account/#item-header-content">Delete Account</a></li>
    </ul>
    </li>
    <li id="groups-personal-li" class="menu-parent"><a href="http://localhost/wordpress/members/athlete-lynn/groups/#item-header-content">Groups <span class="no-count">0</span></a>
    <ul class="sub-menu">
    	<li id="groups-my-groups-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/groups/#item-header-content">Memberships</a></li>
    	<li id="invites-personal-li" class="menu-child"><a href="http://localhost/wordpress/members/athlete-lynn/groups/invites/#item-header-content">Invitations</a></li>
    </ul>
    </li>
    </ul></div> 
    		</ul>
    </nav>
  • You must be logged in to reply to this topic.
Skip to toolbar