Support » Themes and Templates » WP theme dev menu question

  • Hi!

    It’s a long time ago that I themed a WP theme so I’ve forgotten a lot of things :(.

    I want to style a menu with my own id and classes.
    so I call the menu function wp_nav_menu and I see that this is wrapped in a div, but I don’t want this, how can I remove the div?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I tried to use this:

    <?php
    
                    $nav_args= array(
                        'menu'                => '',
                        'container'            => '',
                        'menu_class'        => 'horizontal-list clearfix',
                        'menu_id'            => 'nav',
                        'echo'                => true,
                        'theme_location'    => 'index'
                    );
    
                ?>
                <?php wp_nav_menu( $nav_args ); ?>

    But it doesn’t work, anyone knows why?

    esmi

    (@esmi)


    Forum Moderator


    Short answer: You can’t. Although the Codex documentation implies that it’s possible to remove or change the container, it’s not currently possible.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP theme dev menu question’ is closed to new replies.