Ready to get started?Download WordPress


Removing DIV from wp_nav_menu (2 posts)

  1. haydenhancock
    Posted 3 years ago #

    I am trying to remove the div from the wp_nav_menu function.The codex offers some examples for which I've tried but none of them are working.

    I am developing a theme on WP 3.1.2. It's a blank install with no plugins. Any help would be appreciated!

  2. haydenhancock
    Posted 3 years ago #

    BTW, I've tried:

    function my_wp_nav_menu_args( $args = '' )
    	$args['container'] = false;
    	return $args;
    } // function
    add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );
    <?php wp_nav_menu( array( 'container' => '' ) ); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic