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:
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.
<th scope=”row”> <?php _e(‘seo’) ?> </th>
<input class=”valinp” type=”checkbox” name=”seo” value=”nofollow” id=”nofollow” <?php xfn_check(‘seo’, ‘nofollow’); ?> />
<?php _e(‘nofollow’) ?></label>
- 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!
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.