• I have been looking around for a way to show the menu name in my navigation & cannot find a solution to get it to show on my page. Basically I have 3 sidebar menus & am just trying to get the menu name to appear above the links so that I can style it different. (I can do all of the css). However, I cannot get the menu to appear. Below is my code. I am also trying to get my child pages to show only when the parent link is selected, which I know has to do with the wp_list_pages but I when I add different test code (removed from below) I get no syntax errors, but also nothing displaying differently on the screen so I am obviously doing something wrong. Any help is appreciated!

    / Sidemenus
    function sidebar_menus() {
       if ( has_nav_menu( 'sidebar-menu' ) ) {
    	   wp_nav_menu( array( 'theme_location' => 'sidebar-menu',
    			'depth' => '1',
    			'child_of' => '0',
    		) );
        }
       if ( has_nav_menu( 'sidebar-menu-2' ) ) {
    	   wp_nav_menu( array( 'theme_location' => 'sidebar-menu-2',
    			'depth' => '1',
    		) );
        }
       if ( has_nav_menu( 'sidebar-menu-3' ) ) {
    	wp_nav_menu( array( 'theme_location' => 'sidebar-menu-3' ) );
    
        }
    }

    [Moderator Note: Please post code or markup snippets between backticks or use the code button.]

  • The topic ‘Show Menu Name & Child Page Nav’ is closed to new replies.