I’ve got a default main menu:
wp_nav_menu();
But it gives a list of links in a form:
(...)
<a href="https://wordpress.stackexchange.com/questions/13782/link" title="PageName">PageName</a>
(...)
The very important question is, how to force WP to display it like:
(...)
<a href="https://wordpress.stackexchange.com/questions/13782/link">PageName</a>
(...)
I don’t like the yellow boxes appearing every time I hover anything in menu.
I know it’s possible, because I’ve seen it working, but no idea how? Filters maybe? Any ideas?
The title is an accessibility attribute that helps users with screen readers. It is part of the recommended WC3 standard for navigation items. Just think about that before you decide to eliminate it because you find it annoying.
Rather than modifying the PHP code, you could think about removing it after it’s loaded. It’s very easy to do this with jQuery. First, add this to your functions.php
file:
wp_enqueue_script('jquery');
Next, in your site.js
file, add this code:
<script type="text/javascript" >
jQuery(document).ready(function($){
$('.nav li a').removeAttr('title');
}
</script>
Again, I don’t really recommend doing this, but this is how to accomplish it.