I've got a default main menu:


But it gives a list of links in a form:

<a href="link" title="PageName">PageName</a>

The very important question is, how to force WP to display it like:

  <a href="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:


Next, in your site.js file, add this code:

<script type="text/javascript" >
  $('.nav li a').removeAttr('title');

Again, I don't really recommend doing this, but this is how to accomplish it.

  • this is the way to go! I was thinking more about add_filter('nav_menu_css_class' (...) answer, but it also work. Menu requires JS anyways, so I'll do that this way. By they way, I totally don't want to delete titles I just don't want a items to display yellow popups above them on hover. But I believe it's not possible without getting rid of titles, right? – Wordpressor Apr 3 '11 at 9:42
  • This is something the browser does. For example, IE will display the yellow popups when there is an ALT set on an image, even if there is no title set. Other browsers usually only show the popup if the title is set. You might consider a greasemonkey script (ff) or userscript (chrome) that would remove title attributes on whatever page you're viewing. That way you're not annoyed while the people who visit your site can still benefit from the title attributes that they are used to on most websites. – cwd Apr 3 '11 at 14:25

I'm pretty sure if you clear the "Title Attribute" field in the Appearance > Menu editor that the titles will be removed from the links:

WordPress Menu Admin showing the Link Title Attribute field

  • that's a nice one, but won't work for me - I have no menus in "Menus" section, the one I use is automatically generated by Wordpress. – Wordpressor Apr 3 '11 at 9:31
  • @WordPressor - Your question specifically referred to wp_nav_menu();. Are you trying to remove titles from the results of the fallback function? (pretty sure there's a filter for the page menu fallback function).. – t31os Apr 3 '11 at 15:47
  • @WordPressor - If you are using the default generated menus then you could solve it by creating an explicit menu, which you will probably need to do unless your site stays extremely simple. – MikeSchinkel Apr 3 '11 at 21:29

I have had the same problem and I solve this via wp.

if you ( as like as me before ) cannot see the title attribute in wp menu, check this :

  1. Go to Appearance > Menus.
  2. In the upper right corner ( mine was left corner ! ), click on Screen Options and ensure the "lable" boxes is checked.
  3. now you can edit or remove the label text in menu item.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.