Making Top Menu Links NOFOLLOW
July 27, 2011
A common question I get asked is how to make certain links no follow in the menu at the top of your WordPress site. Most templates don’t have this feature built-in, but fortunately WordPress does and it’s relatively easy to setup a header menu where you choose which links follow and which ones are no follow. In this quick tutorial I will show you how to do it. On my site I’m using the thesis theme, but any template that allows you to use WordPress menus to the menu at the top will work.
Here is a screenshot of the top of my site – I am using the SEO for Firefox plugin to highlight nofollow links:
In this tutorial, I want to change the Disclaimer, Privacy Policy and Terms of Use links to Nofollow, but keep the Home link as do follow.
STEP 1 – Change your theme to use WordPress Nav Menus rather than the menu system that is built into your theme (if necessary)
In the thesis theme you can find this on the site options screen. You need to check your theme to find out how to switch:
STEP 2 – Appearance –> Menus screen & Setting up the Menu.
Click across to the Appearance –> Menu screen in your Dashboard.
Click the Create Menu button, and give it a name. I’ll call mine “Top Menu”
If your theme supports WordPress menus, then you will see the following where you can select the menu you just created so it is used. With Thesis theme you can assign your newly created menu as the “Primary Menu” which is the one at the top of the screen. In some themes, you may be able to define more than just the Primary Menu. Here is what it looks like in Thesis:
I have selected Top Menu to be used as my main menu. If I save the Primary Menu, and refresh my site, here is what I have:
The Menu is gone. That is simply because I have not added any pages or posts to the menu. Let’s do that now.
STEP 3 – Adding items to your menu.
On the Menu screen you will have a list of pages and a list of posts on your site. These can be added to the menu we are creating. In my example, I want to add three PAGES:
I have checked them, and then click the Add to Menu button. You can now see that they are added to the menu:
However, I need my homepage link as well. I can add this as a custom link by typing in the URL and link text, and hitting the Add to Menu button:
This menu item will be added to the bottom, but you can drag and drop to reorganise the links. NOTE: You can create nested menus as well, by dragging the menu items a little to the right (so it appears indented in the list), under the one you want it nested with. I won’t do that here though.
OK, so here is my menu:
.. and my website, after saving the menu:
.. but they are all still do follow.
STEP 4 – assigning the nofollow attribute to the links.
At the top right of your Dashboard, there is a screen options button.
Click it to open up a “secret” panel.
If you know what you are doing, you can check any or all of these boxes, but the ones I recommend you check are Link Target (do you want to open link in a new windows, parent window etc), and the Link Relationship (XFN) which is used to define the nofollow we want. Once you have those checked, you can click the Screen Options button again to close the panel.
Now, you may have noticed that next to each menu item is a little arrow that if you click opens another little panel. Here is the one for my Terms of Use Page:
To make this link nofollow, I simply type nofollow into the Link Relationship box:
I’ll repeat this for Privacy and Disclaimer pages, and save my menu.
Now if I refresh my site, here is what I have:
The three links are now nofollow while the home link remains do follow.
Print This Post






