I'm working on a Wordpress theme on my local machine and i thought it would be cool to use bootstrap with it. I build the website already in html/css but wanted to upload it to Wordpress (To learn wordpress).
Now i'm rebuilding my nav section because i want it to make it customable in my admin-panel. I'm using:
<?php $args = array( 'theme_location' => 'header' ); ?>
<?php wp_nav_menu( $args ); ?>
The bowser displayed a div>ul>li>a. I edited the div, ul and li's class to bootstrap classes but now i need to get an A class of nav-link to my a tag.
This is what my bowser gives me now:
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="http://localhost/wordpress/index-html">Homepage</a>
</li>
</ul>
</div>
This is what i want.
<a href="http://localhost/wordpress/index-html" class="nav-link">Home</a>
I'm editing my nav-menu-template.php now but can't find it. Where can i change the classes of the A tag in wp_nav_menu();
(I know that someone else asked this aswell, but i couldn't get that code to work. Maybe because the commands where from 2014 or maybe because i did something wrong.)