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.
Thanks so much for this! I’ve wanted to add the nofollow attribute to selected links for a while now. All the plugins out there that I could find make ALL blogroll links nofollow.
Seems like an options that should be in the default ‘rel’ list in the core of WordPress.
Going to put a post about this on my blog for future reference as I’m sure I’ll need it later!
I’m glad I could help.
Good work, man. Just what I needed!
Hey,
Thanks brilliant work !!!
I’ve been looking for something like this for ages.
Got a question to ask as well, do you have any idea how you can amend multiple h1 tags on a wordpress site without changing the format of those words.
Thanks in advance
I don’t, sorry.
Just a reminder – if you did this in a previous version, such as WordPress 3.2, if you update to 3.3 you’ll need to do it again. The line number has also changed to 871.