Making Top Menu Links NOFOLLOW

July 27, 2011 by  

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:

image

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:

image

 

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”

image 

 

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:

image

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:

image

 

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:

image

 

I have checked them, and then click the Add to Menu button.  You can now see that they are added to the menu:

 

image

 

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:

image

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:

image

 

.. and my website, after saving the menu:

 

image

 

.. 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. 

image

Click it to open up a “secret” panel.

image

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:

image

To make this link nofollow, I simply type nofollow into the Link Relationship box:

image

 

I’ll repeat this for Privacy and Disclaimer pages, and save my menu.

Now if I refresh my site, here is what I have:

image

 

 

The three links are now nofollow while the home link remains do follow.

Print This Post Print This Post

Related Articles

  • Activating Plugins in WordPress - OK, hopefully you have uploaded the top 10 WordPress Plugins.  The next step is to activate them so that your WordPress install is “using” them. Login to your WordPress Dashboard, and click on the link to the plugins page. When you get to that page, you should see your plugins listed. There are two things to notice here. 
  • Using Widgets In WordPress - Widgets allow WordPress users to easily add in new features to the sidebars of their templates without having to hack template code. e.g. you can add a translator widget that will translate your page into multiple languages, or you could add a Feedburner subscription box.  Adding both of these (and the hundreds of other widgets
  • Top 10 WordPress Plugins - NOTE: This article is quite old.  On 10th May 2009 I posted a new article with an update of what plugins I use.  The article is Top 12 WordPress Plugins Here is my top 10 WordPress Plugins.  I do use others, but these are the first ones I install when I setup a new WordPress site. 1.
  • Installing a WordPress Theme - If you followed the tutorial for installing WordPress plugins, you will already have the skills needed. When you download a theme, you’ll find that it unzips into its own folder.  The following template I downloaded and unzipped is called Andreas01.  You’ll see that the theme includes two folders, wp-andreas01 which contains template files, and the img
  • Creating a homepage in WordPress - If you have installed WordPress  and the plugins recommended in my Top 10 WordPress Plugins article, you ‘ll currently have a blog that looks like the generic WordPress blog, containing a hello world post, and an about page. Note: You can click images to enlarge them. We still have a fair bit of customizing to
"The Money Is In The List"

AWeber proves it to thousands of businesses every day.

Learn how email marketing software
can get you more sales, too.

Comments

2 Responses to “Making Top Menu Links NOFOLLOW”
  1. Darren says:

    Thanks for this Andy!

    Been tearing my hair out trying to figure this out and looking for plugins etc.

    So simple when you know how. Just updated my website in the last 2 mins and all done and dusted.

    My contact, privacy policy and disclaimer pages all have a PR2 – so that was a big waste of PageRank…glad I got it fixed

    Cheers,
    D

  2. uabclst says:

    Thank you very much for this info. I had no idea. I was trying to change the php code but it didn’t work.

    I have exactly the same problem as the guy in prev comment.

    I will definitely subscribe to your newsletter.

    Thanks

Leave A Comment...