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:

  1. Open the edit-link-form.php file (yes, I’m making this very easy for newbies and the hard of thinking!)
  2. On around line 28, find the part that says:

    if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"';
  3. Leave this code alone.
  4. Just above the code, add:

    if ('seo' == $class && strpos($link_rel, 'nofollow') === false) echo ' checked="checked"';
  5. Scroll down and find the line which says:

    <th scope="row"><?php _e('<a href="http://gmpg.org/xfn/">XFN</a> Creator:') ?></th?>
  6. Just underneath this line of code, find the opening table:

    <table cellpadding="3" cellspacing="5">
  7. 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>
  8. 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:

wordpress-seo-gray-hack.png

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: , , , , , , , , , , , ,

Share and Enjoy:
  • Digg
  • del.icio.us
  • Bumpzee
  • Furl
  • Netscape
  • NewsVine
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati


76 Responses to “WordPress Blogroll SEO “Gray” Hack”

  1. Affiliate Freebies and Marketing Ideas » Blog Archive » WordPress Blogroll SEO “Gray” Hack Says:

    [...] Zain wrote a fantastic post today on “WordPress Blogroll SEO â [...]

  2. adding nofollow to blog roll links - Irish SEO, Marketing & Webmaster Discussion Says:

    [...] : 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 [...]

  3. PreBlogging Says:

    great stuff ! I’ve implemented this on my site now.
    Thanks,
    B

  4. jared Says:

    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

  5. Amanda Says:

    Hey guys increase Sales by 30% with Travel—-Do you want a free vacation

  6. How to Add a NoFollow Tag to Your WordPress Blogroll | eCommerce & SEO Says:

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

  7. Rich Says:

    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>

  8. Joni Solis Says:

    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.

  9. JMOZ Says:

    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

  10. Samir Says:

    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.

  11. Wordpress Blogroll hack | Samir Kamble - Webmaster Resourses and Free Wordpress/Joomla Themes Says:

    [...] So enjoy optimising the website for SEO and ready to get ranked higher into search engines.Article taken from Knowledge Constructs Website. [...]

  12. ProBlogger Says:

    any idea where this is in version 2.5 of Wordpress ?

    Thanks

  13. · Search Engine Optimize (SEO) WordPress 2.5 Blogroll | A How To Guide « KnowledgeConstructs.com Says:

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

  14. oyun Says:

    how to nofollow hack

  15. Kral oyun Says:

    thanks

  16. Yemek tarifi Says:

    thanks so much

  17. Emo resimleri Says:

    WordPress Blogroll SEO Nofollow Hack

  18. Roy Malibu Says:

    Dude, I’m headed off to try this right now! This is exactly what I was looking for!! Thanks!

  19. willy Says:

    great great great post! thanks very much for your guide.i am doing now.

  20. Yemek Tarifleri Says:

    Mesajiniz icin tesekkurler bana cok faydali bir bilgi oldu saolun :)

  21. full oyun Says:

    nice thanks

  22. SEO Blogroll: Adding ‘nofollow’ Links to Wordpress Blogroll Says:

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

  23. Ece Says:

    Yemek tarifleri,resim,photo,funny

  24. Oyun Oyna Says:

    thank you very…

  25. Mike Says:

    Works great on 2.5 – not 2.5 +
    Mike

  26. The Brain Machine » Blog Archive » BlogRoll con il nofollow in WordPress Says:

    [...] 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). [...]

  27. Oyun Says:

    very thanks..!

  28. Suro Agung Says:

    excellent, very usefull tutorial

  29. Ebook Search Engine Says:

    Search for thousands of paid ebooks

  30. StumbleUpon Says:

    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!

  31. backlinks Says:

    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.

  32. Seo Pakistan Says:

    SEO COMPANY

  33. Chat Says:

    thanks you very nice site

  34. increase backlinks Says:

    Backlinks are key to increasing your search engine popularity LinkPartnerExpress is the best on the web…I have 6500 links, all quality!!

  35. SEO India | SEM Services India Says:

    Good Post, Keep it up…

  36. California Kid Says:

    Thanks, work well

  37. kral oyun Says:

    thank you

  38. oyun Says:

    Thank you It’s very beautifully

  39. free home insurance quote Says:

    Good Layout and Design. I like your blog. I just added your RSS feed to my Google News Reader. . :) :) :)

  40. 恶猫的博客 Says:

    好文章,这个这个…想转载一下不知道可以不?嘿嘿302

  41. Recent Links Tagged With "blogroll" - JabberTags Says:

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

  42. Istoselidon Says:

    Great article and informativ. I have this bookmarked. Thanks

  43. Dan Says:

    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.

  44. sanalda1numara Says:

    thanks very nice

  45. SEO Tool Says:

    Good post!I also have something about SEO to share. Check out my website.530

  46. SEO Says:

    Great post. Thanks for sharing!
    I also have something about SEO to share. Check out at my website please.180

  47. Türkçe mirc Says:

    Thanks

  48. Tristan Says:

    bP6qcdiASzzMo

  49. TAYIB Says:

    Tutorials on how to hack

  50. tayyib Says:

    what is nofollow hack????

  51. Vitamin Treehouse Says:

    Is this true?

  52. mssmotorrd Says:

    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?

  53. hosting Says:

    thanks

  54. sanat Says:

    think he is a very nice person (not that I know him LOL) and he has a very great voice

  55. скачать бесплатно сериал Says:

    Привет создателям блога, блог красивый, однако вот я не понимаю… Вы там 1 или всё-таки 2 ?? человека… Сиречь как бы пишут 2 человека, честный :) Только пишите однако равно хорошо ))

  56. okey Says:

    Thank you very very much.

  57. irrismCurcE Says:

    Очень понравился ваш блог! Подписался на rss. Буду регулярно читать.

  58. Sandy Saini Says:

    Thanks for the interesting post.

  59. Classifieds free ad posting Says:

    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.

  60. seo optimization services Says:

    seo optimization services…

    Tags:…

  61. porno Says:

    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

  62. sex Says:

    The driver (yes “le pilote” in french ;-) that is missing

  63. sex shop Says:

    Thank you a lot

  64. intastunk Says:

    привет. Админ, хошь прикол ? :D к тебе на сайт можна заходить через яндекс

  65. sikiş Says:

    thank you comment
    doom geçti buradan

  66. SEO Says:

    Thanks for the great SEO tips.

  67. UCellPhonez Says:

    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…

  68. zayıflama Says:

    The driver (yes “le pilote” in french ;-) that is missing

  69. Güzel oyunlar Says:

    thankksss

  70. vbgrup Says:

    thnaks admin

  71. hosting Says:

    thanks moderator

  72. Flaw666 Says:

    Thanks lan

  73. dianchitian Says:

    Thanks for article. Keep up sharing.

  74. mirc Says:

    thanks admin good post

  75. iizle1 Says:

    Plz suggest me how to solve this problem?

  76. iizleporno Says:

    For those of you


Leave a Reply