BuddyDev

Search

[Resolved] Nested Menus Missing

  • Participant
    Level: Initiated
    Posts: 13
    Ethan on #13650

    I leveraged wp_get_nav_menu_items to build a dynamic menu list and with the general wordpress theme it works three nested deep. However, community builder child theme does not. Also for some reason it limits being able see only four menu options under a child list.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #13651

    Hi Ethan,
    Thank you for posting.

    1. No, community builder does not have any specific implementation for the main menu.,

    For the left and Right panel, we are using custom Walker(CB_TreeView_Navwalker) for showing the tree menu.

    If you are trying to do something with the left/right panel menu, the walker may override.

    You can overcome that by copying/creating the panel the child theme.

    I am still not sure what is happening but the theme does not contain any code for restricting nav items.

    Can you please provide more context(which of the menu) and how is it happening. Any link to screenshot will be also very helpful.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 13
    Ethan on #13652

    It’s at the main menu. How do I link to a screenshot?

  • Participant
    Level: Initiated
    Posts: 13
    Ethan on #13653

    The mobile small screen menu doesn’t even recognize a nested structure at all.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #13654

    Hi Ethan,
    It seems there are some confusion on the way menus work. My apologies if we were unable to clarify it in the documents.

    The main menu is not used on mobile screens.

    The mobile screen menu is your left panel menu. Try to add nested elements on the WordPress menu assigned to the left panel location.

    About the screenshot, It is not possible to upload here, please use an upload service like imgur to upload and link here.

    Also, Here is the primary menu generation code

    
    /**
     * Primary Menu block
     * 
     * Generate Primary Menu
     */
    function cb_primary_menu() {
    	// if a nav menu is not assigned to the primary menu, do not show anything.
    	if ( ! has_nav_menu( 'primary' ) ) {
    		return;
    	}
    
    	$menu_class = 'main-nav-' . cb_get_option( 'main-nav-alignment', 'left' );
    	wp_nav_menu( array(
    		'container'      => false,
    		'menu_id'        => 'nav',
    		'menu_class'     => 'main-menu ' . $menu_class,
    		'items_wrap'     => '<div  id="%1$s" class="%2$s"> <ul>%3$s</ul></div>',
    		'theme_location' => 'primary',
    		'fallback_cb'    => 'cb_main_nav',
    	) );
    }
    
    

    We attach the function ‘cb_primary_menu’ to various actions for showing menu in top or secondary header.
    I don’t see anything special. It is normal WordPress Menu generation code.

    Are you using any custom code or plugin for menu handling.

    PS: – You may use the “Set as private reply” in the forum to link me to your site where the problem is and I can quickly assist you.

    It is possible to have some css conflict causing it.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 13
    Ethan on #13655

    I changed the setup of the menu due to the fact that mobile doesn’t allow three level-nesting. And for now it doesn’t seem to be an issue, but if it does become a necessity, I will initiate a private reply and show you in the website.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #13656

    Hi Ethan,
    Thank you for the update.

    Sure, I will be glad to assist when needed.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved