Remove div container class from the wp_nav_menu

Webmaster WordPress Leave a Comment

Removes the div container class from the wp_nav_menu

Place the code below into your themes functions.php template between the <?php.

// Removes div class from wp_nav_menu

add_filter('wp_nav_menu_args', 'prefix_nav_menu_args');
function prefix_nav_menu_args($args = ''){
$args['container'] = false;
return $args;
}

Leave a Reply

Your email address will not be published. Required fields are marked *