In this tutorial, I’ll teach you how to insert rel=”nofollow” to your selected Blogroll links. You must be aware of the fact that WordPress Blogroll is a feature that lets you to show links of your favorite websites on your blog. This feature allows webmasters to link-exchange with other websites easily by showing Blogroll as a widget in sidebar or footer bar or any other hook.

The nofollow attribute in anchor tag <a> is a great SEO (Search Engine Optimization) technique. This should be used carefully only in those links which you don’t want search engines like Google, Yahoo, Bing etc. to follow. If you have several links of other websites in your pages then you should apply rel=”nofollow” to those external links. This step stops link juices to flow to those websites and make it available more for your own pages.

Unfortunately WordPress CMS (Content Management System) has no rel=”nofollow” option to exercise, while you are creating or editing a Blogroll link. This is very frustrating. But don’t worry. I’m going to tell you how to add rel=”nofollow” option while creating or editing a WordPress Blogroll Link.

How to apply rel=”nofollow” to Selected Blogroll Links only

Follow these steps carefully to create re=”nofollow” link relationship (XFN) in Blogroll Links. By default it is not there in WordPress CMS. See the screenshot below, to see what I’m talking about.

Nofollow Option added to a Blogroll Link

Nofollow Option added to a Blogroll Link

The solution is very easy and anyone can do it. Obey the following steps very carefully :

  1. Log into your website’s FTP account to access it and download the file meta-boxes.php present in wp-admin -> includes folder.
  2. Open the file meta-boxes.php file in your favorite text editor. In line number 865 (I’m using WordPress v3.4.1), look for the closing table tag i.e. </table> below it (i.e. in line number 866). Note that the line number can vary if you are using some other WordPress version.
    By default, nofollow option is not available in a Blogroll Link.

    By default, nofollow option is not available in a Blogroll Link.

  3. At line number 865 add the following code-block.
    	<th scope="row"><?php /* translators: xfn: */ _e('nofollow') ?></th>
    	<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: */ _e('nofollow') ?> </span></legend>
    		<label for="nofo">
    		<input class="valinp" type="checkbox" name="nofo" value="nofollow" id="nofo" <?php xfn_check('nofo', 'nofollow'); ?> />&nbsp;<?php /* translators: xfn: */ _e('nofollow') ?>

    See the screenshot below for clear demonstration.

    Creating Nofollow Option in Individual Blogroll Links

    Creating Nofollow Option in Individual Blogroll Links

  4. Save the meta-boxes.php file.
  5. Upload the modified version into wp-admin -> includes folder by overwriting the older file.
  6. Now in your WordPress Control Panel go to Links -> All Links. Edit and save all the links with rel=”nofollow” option if you want.

You should always make a backup copy of the original file before you start to modify it, so that you can easily revert back if anything goes wrong. TechPuffs in no-case can be held responsible for any damage transpired due to improper use of this tutorial. Use this information at your own risk.