Support » How-To and Troubleshooting » Add a Title Attribute to Anchor Tags
5 years, 5 months ago
I am trying to print a menu using the standard wp_nav_menu function and I want to print the name of the menu item in the anchor tag as well as in the title attribute of the anchor tag.
So right now I have this:
And I want this:
<li><a href="#" title="example">example</a>
Any suggestions on how to do this? I don’t see any solutions in the docs.
When you add an item to the menu in the “Menus” administration area, you have the option to set a title attribute for each one.
Thanks for the help, sometimes it feels like I take one step forward and two steps back. 🙂