WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I dont want to have dropdown (select - options) in my wordpress menu, even in mobile or lower width devices. I know I can use css to hide it, but I want to remove it at all. I googled for an hour and I found that I should use a custom walker on Roots!!!! but I dont know whats that and how. please help me, I am a newby.

share|improve this question
    
Which Theme do you use? – kuchenundkakao Jul 20 '14 at 8:17
    
meadowhill - wordpress.org/themes/meadowhill – biji buji Jul 20 '14 at 13:01
wp_nav_menu( array( 'menu_id'=>'nav', 'theme_location'=>'header-menu' , 'depth' => 1) );

you can use depth parameter for this.. Click here!

More Info: child theme

Create child theme and copy code from header.php of parent theme then replace the code

 wp_nav_menu( array( 'menu_id'=>'nav', 'theme_location'=>'header-menu' ) );

with the above code.

share|improve this answer

Since WP v3.3.0 you can use filter wp_nav_menu_args to alter arguments of function wp_nav_menu that used to display a navigation menu. Add this code in functions.php of your theme files. You can change functions name wpse155177_nav_menu_args.

/**
* @see wp_nav_menu()
*
* @return array $args Array of wp_nav_menu() arguments.
*/
add_filter( 'wp_nav_menu_args', 'wpse155177_nav_menu_args', 1, 1 );
function wpse155177_nav_menu_args( $args )
{
    //lookup theme_location ie: header-menu
    if ( isset( $args['theme_location'] ) && 'header-menu' == $args['theme_location'] ) {
        $args['depth'] = 1; //levels of the hierarchy are to be included
    }

    return $args;
}
share|improve this answer

Simply try to move in menu settings "menu voices"(pages as :home, who we are, what to do, etc) alling them one under another.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.