WordPress Blogroll SEO “Gray” Hack
Written by Zain on October 26th, 2007{ 76 comments }
Do you need a hack for your blogroll to be able to control to your blogroll and add a “nofollow” attribute to it? Don’t have time to scour the WP Plugin resources to find something which does this? I’m going to admit – I didn’t have time to check if there is a plugin but thought this is a nice tip anyway just to demonstrate how you can get some more control over your WordPress system if you know how.
And I do…
I call this the “WP Blogroll Gray Hack”, named after the Stomper who first showed me it. Gray H, you know who you are – thanks for this little tip. I owe you a beer.
The method I’m going to demonstrate has actually been slightly updated as the original meant losing some of the other XFN options. This version actually adds more to the existing hack and provides a new checkbox to easily add the nofollow attribute.
Here’s the quick how-to guide for WordPress newbies on how you can do this.
The file we’re going to be hacking today is:
/wp-admin/edit-link-form.php
Before we get started, BACK UP YOUR FILE.
Okay, now for step-by-step guide on the Gray Hack:
- Open the edit-link-form.php file (yes, I’m making this very easy for newbies and the hard of thinking!)
- On around line 28, find the part that says:
if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"';
- Leave this code alone.
- Just above the code, add:
if ('seo' == $class && strpos($link_rel, 'nofollow') === false) echo ' checked="checked"';
- Scroll down and find the line which says:
<th scope="row"><?php _e('<a href="http://gmpg.org/xfn/">XFN</a> Creator:') ?></th?>
- Just underneath this line of code, find the opening table:
<table cellpadding="3" cellspacing="5">
- Add the following code just underneath this opening table tag.
<tr>
<th scope="row"> <?php _e('seo') ?> </th>
<td>
<label for="nofollow">
<input class="valinp" type="checkbox" name="seo" value="nofollow" id="nofollow" <?php xfn_check('seo', 'nofollow'); ?> />
<?php _e('nofollow') ?></label>
</td>
</tr>
- Save the file.
Now, when you go into the admin section and go to Blogroll / Add Link, you’ll now find a neat little checkbox that looks like this:
All you need to do is to click on the “nofollow” checkbox when adding or editing your Blogroll links and your links will then become nofollowed!
Caveats:
The hack works on my system just fine – if it doesn’t work on yours, then check the instructions again and make sure you are reading them properly.
Knowledge Constructs accepts no responsibility for any data loss, corruption to your website, loss of libido or permanent mental or physical damage cause by trying out this hack.
In the words of Spiderman’s uncle: “With great power comes great responsibility” – use the hack wisely otherwise Karma might come back and bite you in the ass.
Finally, updating your WordPress site will *KILL* this hack as WP will overwrite the edit-link-form.php file. We are working on a solution to this and may well build an SEO friendly blogroll plugin. If there’s enough interest, that is…
Tags: blogroll gray hack, blogroll hack, blogroll seo, gray hack, how-to guide, link hack, links, nofollow, search engine optimization, SEO, tip, WordPress, wordpress blogroll

October 26th, 2007 at 7:00 pm
[...] Zain wrote a fantastic post today on “WordPress Blogroll SEO â [...]
November 6th, 2007 at 10:03 am
[...] : a great solution can be found here, it requires a file edit, but still it’s worth it. linky : WordPress Blogroll SEO Nofollow Hack Blog Archive Knowledge Constructs __________________ my sites :irish jobs / irish online forum / irish job advice forum/ jobs in [...]
November 6th, 2007 at 10:10 am
great stuff ! I’ve implemented this on my site now.
Thanks,
B
November 10th, 2007 at 7:00 pm
Hello,
we are looking for a company to handle our word press theme and plugins for a word press ecommerce site and want to know if you would possibly be interested. Please contact me at jaredesguerra@gmail.com to talk in further detail. Thank you
November 23rd, 2007 at 6:21 pm
Hey guys increase Sales by 30% with Travel—-Do you want a free vacation
November 30th, 2007 at 11:22 pm
[...] Sometimes you link to a site and you want a NoFollow tag on that link. If you do, this page explains how to hack Wordpress so you have that option in your Blogroll: WordPress Blogroll SEO Nofollow Hack [...]
December 6th, 2007 at 4:45 am
Works great on my 2.3.1 WordPress. Only thing different was on item #5
>
my existing code did not have the ? and I left it as is.
>/th>
January 27th, 2008 at 1:58 am
Why would you want a NoFollow tag on a link? What does it have to do with SEO? Yes, I am new to all this stuff.
March 5th, 2008 at 7:14 pm
If you don’t want to hack core files, I wrote a simple plugin that adds nofollow to all blogroll links at http://jmoz.co.uk/blog/wordpress-blogroll-nofollow-plugin/8
March 11th, 2008 at 10:20 am
Lovely information mate.We can hack the plugin instead of using an additional plugin.Also i like the way you interpreted the information.Very easy to understand for a newbie user also.
Regards,
Sam.
March 12th, 2008 at 10:12 am
[...] So enjoy optimising the website for SEO and ready to get ranked higher into search engines.Article taken from Knowledge Constructs Website. [...]
March 30th, 2008 at 10:55 am
any idea where this is in version 2.5 of Wordpress ?
Thanks
April 3rd, 2008 at 10:34 am
[...] I did a while back called “WordPress Blogroll SEO Gray Hack ” where I explained how to search engine optimize (SEO) your WordPress blogroll and control the amount Page Rank juice flowing out of your external [...]
April 10th, 2008 at 10:04 pm
how to nofollow hack
May 6th, 2008 at 2:43 pm
thanks
May 6th, 2008 at 2:54 pm
thanks so much
May 6th, 2008 at 3:03 pm
WordPress Blogroll SEO Nofollow Hack
May 20th, 2008 at 2:20 pm
Dude, I’m headed off to try this right now! This is exactly what I was looking for!! Thanks!
June 16th, 2008 at 4:38 pm
great great great post! thanks very much for your guide.i am doing now.
July 1st, 2008 at 10:12 pm
Mesajiniz icin tesekkurler bana cok faydali bir bilgi oldu saolun
July 7th, 2008 at 1:47 am
nice thanks
July 10th, 2008 at 12:11 pm
[...] hack was tested only on (Wordpress 2.5 or later) Original Source: Knowledge Constructs Finally, all future WordPress Updates will *KILL* this hack as WP will overwrite the [...]
July 11th, 2008 at 1:22 pm
Yemek tarifleri,resim,photo,funny
July 15th, 2008 at 7:12 pm
thank you very…
July 17th, 2008 at 8:51 pm
Works great on 2.5 – not 2.5 +
Mike
August 6th, 2008 at 6:39 pm
[...] Sappiamo tutti la storia ormai, Google penalizza chi vende i famosi link testuali che spesso e volentieri per i blogger sono la principale fonte di reddito. Esiste un metodo di personalizazione del BlogrRoll che permette di aggiungere ai collegamenti il famoso tag nofollow in modo da evitare la penalizzazione, vediamo come fare (come consigliato da Knowledge Constructs). [...]
August 8th, 2008 at 4:59 pm
very thanks..!
August 12th, 2008 at 2:49 am
excellent, very usefull tutorial
August 15th, 2008 at 11:14 pm
Search for thousands of paid ebooks
August 16th, 2008 at 8:36 pm
Thanks for the informative post.. and thanks for adding our comment to the blog. I am subscribing to your feed so I don\’t miss the next post!
August 17th, 2008 at 12:38 am
First of all congratulation for such a great site. I learned a lot reading article here today. I will make sure i visit this site once a day so i can learn more.
August 31st, 2008 at 12:04 am
SEO COMPANY
August 31st, 2008 at 6:14 pm
thanks you very nice site
September 8th, 2008 at 8:20 pm
Backlinks are key to increasing your search engine popularity LinkPartnerExpress is the best on the web…I have 6500 links, all quality!!
September 11th, 2008 at 12:04 pm
Good Post, Keep it up…
September 18th, 2008 at 5:55 am
Thanks, work well
September 21st, 2008 at 2:10 pm
thank you
September 21st, 2008 at 2:11 pm
Thank you It’s very beautifully
September 21st, 2008 at 10:36 pm
Good Layout and Design. I like your blog. I just added your RSS feed to my Google News Reader. .
October 1st, 2008 at 1:11 pm
好文章,这个这个…想转载一下不知道可以不?嘿嘿302
October 13th, 2008 at 5:19 am
[...] public links >> blogroll Comment on WordPress Blogroll SEO “Gray” Hack by Suro Agung Saved by destamono on Sat 11-10-2008 GB is Moving Saved by Ckleiman on Sat 11-10-2008 Our Mini [...]
December 11th, 2008 at 11:32 am
Great article and informativ. I have this bookmarked. Thanks
December 22nd, 2008 at 8:22 am
This appears to be no longer valid in WP version 2.7
It’s almost like WP is going out of their way to make sure this feature doesn’t get enabled.
December 26th, 2008 at 5:09 am
thanks very nice
December 27th, 2008 at 4:22 pm
Good post!I also have something about SEO to share. Check out my website.530
December 27th, 2008 at 6:03 pm
Great post. Thanks for sharing!
I also have something about SEO to share. Check out at my website please.180
December 28th, 2008 at 4:59 am
Thanks
January 6th, 2009 at 3:28 pm
bP6qcdiASzzMo
January 18th, 2009 at 6:16 pm
Tutorials on how to hack
January 20th, 2009 at 4:44 am
what is nofollow hack????
May 2nd, 2009 at 12:43 am
Is this true?
May 3rd, 2009 at 12:52 pm
It’s the first time I commented here and I must say you share us genuine, and quality information for bloggers! Good job.
p.s. You have a very good template for your blog. Where did you find it?
May 3rd, 2009 at 4:35 pm
thanks
May 7th, 2009 at 2:45 pm
think he is a very nice person (not that I know him LOL) and he has a very great voice
June 14th, 2009 at 7:25 pm
Привет создателям блога, блог красивый, однако вот я не понимаю… Вы там 1 или всё-таки 2 ?? человека… Сиречь как бы пишут 2 человека, честный
Только пишите однако равно хорошо ))
July 2nd, 2009 at 12:13 pm
Thank you very very much.
July 2nd, 2009 at 3:08 pm
Очень понравился ваш блог! Подписался на rss. Буду регулярно читать.
July 8th, 2009 at 5:29 am
Thanks for the interesting post.
August 19th, 2009 at 4:15 pm
Lovely information mate.We can hack the plugin instead of using an additional plugin.Also i like the way you interpreted the information.Very easy to understand for a newbie user also.
September 29th, 2009 at 10:48 pm
seo optimization services…
Tags:…
October 10th, 2009 at 3:40 pm
Good observation, Ghettodefender!
And I think any American city would be just as risky, so that it was Chicago is beside the point, imo.
Hmmm
October 18th, 2009 at 8:43 pm
The driver (yes “le pilote” in french
that is missing
October 22nd, 2009 at 8:18 pm
Thank you a lot
October 29th, 2009 at 8:19 pm
привет. Админ, хошь прикол ?
к тебе на сайт можна заходить через яндекс
November 12th, 2009 at 9:32 pm
thank you comment
doom geçti buradan
November 30th, 2009 at 4:47 pm
Thanks for the great SEO tips.
December 2nd, 2009 at 3:49 am
Wow, this is older article and as we know wordpress engines has frequenly update but when I tried is work its amzing. Thanks mate for this good work very helpfull…
December 4th, 2009 at 5:57 pm
The driver (yes “le pilote” in french
that is missing
December 7th, 2009 at 3:46 pm
thankksss
December 7th, 2009 at 3:47 pm
thnaks admin
December 7th, 2009 at 3:47 pm
thanks moderator
December 8th, 2009 at 2:19 am
Thanks lan
December 12th, 2009 at 9:33 am
Thanks for article. Keep up sharing.
January 14th, 2010 at 9:54 am
thanks admin good post
January 22nd, 2010 at 7:29 pm
Plz suggest me how to solve this problem?
February 8th, 2010 at 11:00 pm
For those of you