ALERT: WE HAVE MOVED TO http://codingmassacre.com/!!
Earlier today I was looking on how to add “rel=nofollow” to only a few of the links to my WordPress blogroll. I came across outdated instructions, as WordPress has since changed some of their php files. After doing some searching on how to add the nofollow tag to whatever blogroll links you want I have come up with an answer.
In your website’s server go to /wp-admin/includes/. Look for meta-boxes.php. If you’re on WordPress 3.2 on line 857 add the following code. If you’re on WordPress 3.3 it’ll go on line 871.
<tr> <th scope="row"> nofollow </th> <td> <label for="nofo"> <input class="valinp" type="checkbox" name="nofo" value="nofollow" id="nofo" <?php xfn_check('nofo', 'nofollow'); ?> /> nofollow</label> </td> </tr>
(or get the code from Pastebin here
After that save the file and put the updated version with the new code onto your server, overwriting the old file. From then go to your website’s wp-admin/link-manager.php Go to edit an individual link. At the bottom of the Link Relationship (XFN) you will see a nofollow box.
Check it. Then click update link. You’ve then successfully added the nofollow tag to that individual blogroll link! A quick look at the source code for your website will verify that it’s been done correctly.
Please note whenever you update WordPress you will have to re-add the code. If you are looking for an easy way to do it to all your blogroll links simply install a plugin such as Blogroll Nofollow.