One of my pet peaves with WordPress is that you can’t specify all the attributes to links in your blog roll. While it’s possible to add some of the unpopular XFN relationship data to inform people about your relationship to the link, like ::
- if you met the person you are linking to
- it’s a link to a friend or family member
- if you happen to have a crush the person
- or it’s another website you own
While these are nice, they don’t normally serve much purpose for me. The XFN relationships that are of interest me are ::
- rel=”nofollow” : for limiting the flow of pagerank
- rel=”external” : XHTML compliant version of target=”_blank”
So here is a quick tutorial as to how you can add these attributes to your current version of WordPress (done for version 2.7).
How to add nofollow to Wordpress Blog links
Warning:As with all editing of files, you should keep a backup of them before you start to change them. Believe me, it will save some headaches along the way.
Adding the nofollow and external attributes is quick, easy and painless, here are the 3 steps.
- open file /wp-admin/edit-link-form.php
- Go to line line 193 / 194 and find
<tr>
<th scope="row"> <?php _e('identity') ?> </th> - Above that add
<tr>
<th scope="row"> <?php _e('seo') ?> </th>
<td><fieldset><legend class="hidden"> <?php _e('seo') ?> </legend>
<label for="external">
<input class="valinp" type="checkbox" name="seo" value="external" id="external" <?php xfn_check('seo', 'external'); ?> />
<?php _e('external') ?></label>
<label for="nofollow">
<input class="valinp" type="checkbox" name="seo" value="nofollow" id="nofollow" <?php xfn_check('seo', 'nofollow'); ?> />
<?php _e('nofollow') ?></label>
</fieldset></td>
</tr>
Once you have this, go to Links on the side bar, and now you can change existing links or add new links with these attributes. There will now be an extra line in the Link Relationship section of your Links page.
Why use rel=”nofollow”
This is used when you don’t particularly want to endorse a link you are linking too. Normally a link to another page from your website, is seen as a vote for that page. And each page only has a certain ammount of voting power. If you use the rel=”nofollow” no virtual vote will be passed to the link tartget. For more info have a check for “PageRank”.
Example of controlling votes via rel=”nofollow”. If in your blog roll you have 10 links, but 2 of them are to well know services, you can choose to disable your vote to them, and to increase the effectiveness of a link to those other pages.
Why use rel=”external”
In XHTML Strict the link attribute target is not supported. Previoulys target was used as a link attribute to open new pages, break out of frames, by using target=”_blank” , target=”_parent” etc. Now in XHTML you need to use rel=”external” to inform the browser that this should be a new
Next time at BlackDog
Next week I will be discussing on how to edit your wordpress template, to just have your blog roll on your main page of your blog.