Are you looking to add title attributes to your WordPress navigation menu items?
The title attribute allows you to provide extra information about a menu item. It often appears as tooltip text when a user’s mouse moves over the link.
In this article, we will show you how to add title attributes in WordPress navigation menus for both classic themes and block themes.
Why Add Title Attributes to Navigation Menu Items?
In WordPress, you can add a title attribute to better describe any HTML element. This is often used with links and images to provide extra information that appears as a tooltip when the user hovers their mouse over the element.
Here’s an example of an image title attribute displayed in a tooltip. The user can learn more information about the image by moving their mouse over it.
You can learn more in our guide on the difference between image alt text vs. title.
We also recommend you use the title attribute when adding links to your post. This allows users to see where the link will take them before they click it.
Some SEO experts believe that the link attribute is useful for search engine optimization (SEO) because it allows you to provide more context.
The title attribute may also be read out loud by screen readers that are used by visually impaired users. However, it is often ignored, and the anchor text is read instead.
With that being said, let’s take a look at how to add the title attribute in WordPress navigation menus. You can use the links below to jump to the method that works with your theme:
Adding a Title Attribute to Classic Theme Menu Items
If you are using a classic WordPress theme, then you can customize your navigation menu by visiting Appearance » Menus in your dashboard.
However, you are not able to add a title attribute to menu entries by default.
To add this capability, you will need to click the ‘Screen Options‘ tab in the top right corner of the screen. This will bring down a menu, where you need to click on the check box next to the ‘Title Attribute’ option.
This will add a title attribute field for when you create or edit a menu entry.
Now, you can scroll down and click on any menu item in your existing menu to expand it. You will see the title attribute field.
You can now add the text you want to use as a title. You can also expand other menu items and add title attributes to them.
Don’t forget to click on the ‘Save Menu’ button at the bottom of the page to store your changes.
You can now visit your WordPress website and take your mouse over a link in the navigation menu. You will see the title attribute displayed as a tooltip.
Adding a Title Attribute to Block Theme Menu Items
If you are using a block theme, then you can customize your navigation menu using the Full Site Editor. This editor allows you to add title attributes to your menu entries by default.
First, you need to navigate to Appearance » Editor in your WordPress admin area and then click on the ‘Navigation’ option to find your menus.
You will need to select the menu you wish to edit from the list.
Now, you can click the preview pane on the left to open the editor full screen. Make sure you can see the settings pane on the left. If not, then you can display it by clicking the ‘Settings’ button at the top of the screen.
Next, click the menu item in the settings pane that you wish to edit. This will display the options for that entry, including the title attribute.
Simply type your title into the ‘Title Attribute’ field.
Make sure you click the ‘Save’ button at the top of the screen to store the new settings. You will need to click a second ‘Save’ button to confirm.
Now, you can visit your website to see the menu title attribute in action.
Expert Guides for Customizing WordPress Navigation Menus
Now that you know how to add a title attribute in your navigation menu, you may like to see some other articles related to customizing the WordPress navigation menu:
- How to Add a Navigation Menu in WordPress (Beginner’s Guide)
- How to Add Custom Navigation Menus in WordPress Themes
- How to Add Titles in WordPress Menu Without Linking to a Page
- How to Add Specific Posts to WordPress Navigation Menu
- How to Add Topics in WordPress Navigation Menus
- How to Style WordPress Navigation Menus
- How to Add a Mega Menu on Your WordPress Site (Step by Step)
- How to Create a Mobile-Ready Responsive WordPress Menu
We hope this tutorial helped you learn how to add a title attribute in WordPress navigation menus. You may also want to see our guide on how to increase your blog traffic or our expert pick of the best contact form plugins for WordPress.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Moinuddin Waheed says
I find it interesting to know that seo is more human than we are and it has more consideration for all than we do.
I mean when we do seo taking care of title and alt tags and we try to make sure it optimizes on seo parameters, it in turn lets screen readers to view and read clearly.
I didn’t know that menu options also does have option for title attribute. thanks for this addition.
Ralph Miller says
This was incredibly helpful. I didn’t know there was a menu for screen options. My title attribute had disappeared and this absolutely helped me find it. Thank you!
WPBeginner Support says
You’re welcome, glad our guide was helpful
Admin
Otto says
My God!
Thanks a lot, you are amazing people!
WPBeginner Support says
You’re welcome, glad our article was helpful
Admin
Fifa says
I don’t know why all the praises here but I’ve tried to follow a few of instructions from this site and NOTHING WORKS.
WPBeginner Support says
At least a few of our articles should work for every site, are you using WordPress.com with our WordPress.org tutorials? https://www.wpbeginner.com/beginners-guide/self-hosted-wordpress-org-vs-free-wordpress-com-infograph/
Admin
Jim says
Wow, thank you! I’ve been tearing my hair out all day trying to inject the title attribute with the nav_menu_link_attributes, Nothing would work. This was so easy and worked great. I had no idea all that stuff was hidden in Screen Options. Thanks again!
Amauri says
Thanks, you saved me. A crystal clear tutorial.
Linda Paul says
This did not work at all for me. In the example screen shots you say to scroll down and click any menu item and expand it. The screen shot clearly shows URL, Navigation Lable, Title Attribute. But when I expand the menu item I want to edit, there IS NO URL associated with it. I am trying to make this one category read in ascending order (oldest to newest.)
Hüsna Hüner says
Thank you very much for menu title attirube. I am turkish not speak english bro
WPBeginner Support says
Hi Hüsna,
You are welcome
Admin
Kalanda says
i need to own-org website
WPBeginner Support says
Hi Kalanda,
Check out our step by step guide on how to start a WordPress blog.
Admin
Minhazul Islam says
nice tutorial
Mike Maxson says
Thanks for this, did not even know this feature existed. You learn something new everyday.