WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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 have an HTML/CSS template having a horizontal menu. I need to convert the template into a WordPress theme. I am stuck with the menu. I have used the wp_nav_menu function in my header.php file and have also completed the functions.php file. The menu is now displaying vertically with bullets. I need to implement the menu now, but am unable to find and associate the proper css class to the menu_class parameter. Kindly assist.

Thanks and Regards


share|improve this question

Just look at wp_nav_menu arguments:


$defaults = array(
    'theme_location'  => '',
    'menu'            => '',
    'container'       => 'div',
    'container_class' => '',
    'container_id'    => '',
    'menu_class'      => 'menu',
    'menu_id'         => '',
    'echo'            => true,
    'fallback_cb'     => 'wp_page_menu',
    'before'          => '',
    'after'           => '',
    'link_before'     => '',
    'link_after'      => '',
    'items_wrap'      => '<ul id="%1$s" class="%2$s">%3$s</ul>',
    'depth'           => 0,
    'walker'          => ''

wp_nav_menu( $defaults );


You can use menu_id argument to set its id attribute and menu_class to set its class attribute. You can set containers id/class attributes as well.

share|improve this answer

Your Answer


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.