Reading now : Wordpress Blogroll hack

Wordpress Blogroll hack

March 12th, 2008

Hi guys i have just discovered how important is “No-follow” attribute is for doing SEO on you website.And while doing some research on it, i came across this cool wordpress hack which i would like to share with all.So that you can take up your website high into search engines.

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

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.

Comments

7 Responses to “Wordpress Blogroll hack”

  1. felex
    6:39 am on April 20th, 2008

    मे हेकिन्ग सिख्नना चाह्ता हु :twisted:

  2. samir
    6:44 pm on April 20th, 2008

    very well tried felex :mrgreen: Keep tryin!!!

  3. Mike
    8:53 pm on July 17th, 2008

    it does not work on 2.5 as “Scroll down and find the line which says:<?php _e(’XFN Creator:’) ?>” does not exist on 2.5

    Thanks,
    Mike :???:

  4. Digital Point
    5:54 pm on February 13th, 2009

    Great article, adding it to my bookmarks!

  5. Reseller hosting
    12:46 pm on February 21st, 2009

    Great article, adding it to my favourites!

  6. DP
    10:05 pm on February 21st, 2009

    I really like your blog template, is makes it simple to navigate.

  7. mssmotorrd
    12:52 pm on May 3rd, 2009

    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?

Leave a Reply

Follow me Socially

Follow me on Twitter.

Join me on Linkedln.

Join me at Facebook.

Subscribe to RSS feeds.

Subscribe to Newsletter

Quote of the day

Buddhism has the characteristics of what would be expected in a cosmic religion for the future: it transcends a personal God, avoids dogmas and theology; it covers both the natural & spiritual, and it is based on a religious sense aspiring from the experience of all things as a meaningful unity.