How to remove ID and class from menu

 'menuname', 
  'container'       => false,
  'echo'            => false,
  'items_wrap'      => '%3$s',
  'depth'           => 0,
);

echo strip_tags(wp_nav_menu( $menuParameters ), '' );
?>

Ref wordpress

out put will be like

contac Us

if you want to add any class then add in function.php

add_filter('nav_menu_css_class', 'my_css_attributes_filter', 50, 1);
add_filter('nav_menu_item_id', 'my_css_attributes_filter', 50, 1);
add_filter('page_css_class', 'my_css_attributes_filter', 50, 1);
function my_css_attributes_filter($var) {
  return is_array($var) ? array_intersect($var, array('current-menu-item')) : '';
}

output will be like


Facebooktwittergoogle_plusredditpinterestlinkedinmail

Leave a Reply

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