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 a wp theme with this menu in header:

    <div id="header_nav">
        <ul id="nav" class="clearfloat">
            <li><a href="<?php echo get_option('home'); ?>/" class="on">Home</a></li> 
            <?php wp_list_pages('title_li='); ?>

I followed the tut here http://www.wpbeginner.com/wp-themes/how-to-add-custom-navigation-menus-in-wordpress-3-0-themes/

and replace it with

<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'menu-header' ) ); ?>

but it doesn't style at all like previously. So is it really the right way ?

share|improve this question
<?php wp_nav_menu( array('theme_location'  => 'primary or whatever you set it', 'sort_column' => 'menu_order', 'menu_id' => 'nav', 'menu_class' => 'clearfloat', 'container_id' => 'header_nav' ) ); ?>

Codex if your friend! http://codex.wordpress.org/Function_Reference/wp_nav_menu

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.