Remove the Title Attribute from WordPress Category and Page Lists

I was creating a drop down menu for the categories in my Magazine Basic theme and I came across something that started to annoy me a bit. When you hover over the menu item, and the sub-menu dropped down, a title attribute would appear and cover some of the menu. This title attribute it hard wired into WordPress. Just hover over any menu item above and you will see a yellow box appear that says something like “View all posts files under…”.
This is a useful attribute to add to any site in regards to the Web Accessibility Initiative, but if it interferes with the basic navigation of your site, I think it is okay to nix it.

Here is a simple pieces of code that you can use to remove the title attribute from your category list:


If you really want to get fancy, you can add this as a function to your theme’s function.php file. If the file doesn’t exist, just create it.
Add this:


Now when you want to call your category list, use instead of .
You can do the same to your page lists, just replace wp_list_categories('echo=0') with wp_list_pages('echo=0').

Share this:

Email
Facebook
Twitter
Pinterest
Pocket

Premium Themes for WordPress

Looking for an easy-to-use Premium Theme for WordPress? Check out Themes by bavotasan.com and have your site up and running in no time.

Use this WordPress website builder to build powerful websites in no time for your or your clients.

WordPress Hosting

WP Engine – designed from the ground-up to support and enhance the workflow of web designers.

Bluehost – providing quality web hosting solutions since 1996.

About the author

Picture of Luke Perrie

Luke Perrie