Remove classes from wordpress menu

I am calling a wordpress menu inside my header of wordpress site. I am using the following code:

<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false, 'items_wrap' => '<ul>%3$s</ul>' ) ); ?>

It return me exactly what I need but it puts different classes on <ul> and <li> within the menu. What I need is exactly as follows:

Read More
    <ul>

      <li class="active"><a href="index.html">Home</a>
        <ul>
          <li><a href="#">Libero</a></li>
          <li><a href="#">Maecenas</a></li>
          <li><a href="#">Mauris</a></li>
          <li class="last"><a href="#">Suspendisse</a></li>
        </ul>
      </li>

      <li><a href="style-demo.html">Style Demo</a>
        <ul>
          <li><a href="#">Lorem ipsum dolor</a></li>
          <li><a href="#">Suspendisse in neque</a></li>
          <li class="last"><a href="#">Praesent et eros</a></li>
        </ul>
      </li>

      <li><a href="#">Our Services</a></li>
      <li class="last"><a href="#">Long Link Text</a></li>

    </ul>

No classes on any <ul> or <li> but “active” class on the current menu item. Any help would be much much appreciated.

Related posts

Leave a Reply