Is Sage adding this classes for nav or its wp default

Hi, first thing i want to say that this is my first project using sage, and im testing it on real project, and all i can say for now that this is probably the best theme boilerplate ever. Love it so far.

My question is when it comes to rendering menus (navs), and as we all know wordpress bloats navigation’s html with a lot of classes. For instance HTML5Blank comes with functions that removes that from nav menus. When adding menu, my HTML with Sage looks like this.

                    <div class="menu-glavni-menu-container"><ul id="menu-glavni-menu" class=""><li id="menu-item-24" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-6 current_page_item menu-item-24"><a href="http://localhost/mateus/">Početna</a></li>
<li id="menu-item-28" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-28"><a href="http://localhost/mateus/usluge/">Usluge</a></li>
<li id="menu-item-25" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-25"><a href="http://localhost/mateus/pogon/">Pogon</a></li>
<li id="menu-item-26" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-26"><a href="http://localhost/mateus/proizvodi/">Proizvodi</a></li>
<li id="menu-item-27" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-27"><a href="http://localhost/mateus/reference/">Reference</a></li>
<li id="menu-item-23" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-23"><a href="http://localhost/mateus/o-nama/">O nama</a></li>
<li id="menu-item-22" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22"><a href="http://localhost/mateus/kontakt/">Kontakt</a></li>
</ul></div>                
</nav>```





I dont need any of these classes that are added. So the question is, are there any walkers in Sage that do this kind of stuff or is this the classic wordpress default behavior to add classes. All i could find in Sage is this: 


`add_theme_support('soil-nav-walker');`


Is this maybe adding the classes? What is this exactly? Where are this walker options? 
Just to be clear i know how to get rid of the wordpress classes but i want to know is this a feature from Sage or default from Wordpress. 
Thanks in advance

Hey Mario,

All of those classes are added by standard WordPress.

this line in Sage adds support for a plugin called Soil (also by the Roots team) which does what you’re after; it turns this:

  <li id="menu-item-8" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8"><a href="/">Home</a></li>
  <li id="menu-item-9" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-9"><a href="/sample-page/">Sample Page</a></li>

into

 <li class="menu-home"><a href="/">Home</a></li>
 <li class="menu-sample-page"><a href="/sample-page/">Sample Page</a></li>

Welcome to Roots!

1 Like

Thanks for infos!! Im glad that Sage lets you do what ever you want, i must say that i love the idea behind not erasing anything from Sage, but adding features i want.

1 Like