WP theme dev menu question (3 posts)

  1. Yaeko
    Posted 5 years ago #


    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?


  2. Yaeko
    Posted 5 years ago #

    I tried to use this:

                    $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?

  3. esmi
    Forum Moderator
    Posted 5 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic