wp_nav_menu add link class
-
Just wondering if anyone knows a way of adding a class to the first link displayed in wp_nav_menu, I’ve got it working so it displays a drop down like so
<li id="menu-item-393" class="menu-item-393"> <a href="/">Forums</a> <a href='/' class='SplitCtrl' rel='Menu'></a> <div class='Menu JsOnly tabMenu'> <div class='primaryContent menuHeader'> <h3>Forums</h3> <div class='muted'>Quick Thread/forum Links</div> </div> <ul class='secondarydroplinks'> <li id="menu-item-394" class="menu-item"><a href="/">child one</a></li> <li id="menu-item-396" class="menu-item"><a href="/">child two</a></li> </ul></div> </li>
but is there any way I can give only the first generated a link a class called navlink? ie:
<li id="menu-item-393" class="menu-item-393"> <a href='/' class='navLink'>Forums</a> <a href='/' class='SplitCtrl' rel='Menu'></a> ...
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_nav_menu add link class’ is closed to new replies.