Edit WordPress Comment Section to Save PageRank

Written by Pavan Kumar on June 13, 2009


Google’s has changed its way of viewing nofollow links on websites. Yesterday, you read the SEO analysis of new nofollow. And you probably have read that converting nofollow links to no links would help to send the same PR juice to genuine links. And I promised you that my next post will guide you on changing the comment section to converting nofollow to NO links and hence this post 🙂

Here is how you can change nofollow comment links on wordpress blogs easily. Just a little modification on your wordpress blog theme code can help you in saving your PR juice which gets wasted on useless nofollow links.

Coming to codes,

Open WordPress theme editor, you will find a list of theme files on your current theme. Click on comments.php, it opens comments.php for editing, proceed to following steps.

The normal WordPress theme will have this code to link to comment author, which by default is a nofollow one. Search for this code using your browser search option(Ctrl+F on firefox).

<?php comment_author_link(); ?>

The output of this kind of link when I comment on your blog would be like this: Pavan Kumar

This kind of nofollow link will kill some amount of your PR juice based on the number of comments. You can change the above code into this one:

<?php print get_comment_author(); ?> from <?php comment_author_url(); ?>

With this new code, your comment section will show this for my comment on your blog: Pavan Kumar from http://www.techpavan.com

If you think of advantages and disadvantages of this kind of coding, main advantage is the topic of this post – utilize all PR juice. And disadvantage being your regular readers and commentators might feel it bad to post comment without a link credit (genuine commentators and friends don’t care if it is a nofollow or dofollow link, just they need a link if someone wants to visit their blog).

Note 1: Comments on this blog will not be changed, it will be continued as it was previously.

Note 2: WordPress plugin developers can attempt to develop a plugin to convert all such comment section author credit to javascript so as to bypass Google and still retain a link credit 🙂 .


Subscribe to RSS Feed or Get updates on your inbox:

People who liked this also read:

5 Readers responded to this post

Hi I edited the file…. but the same format is being shown ..no new format is shown….

I don’t expect that to happen. Did you edit the correct file? I mean the file of the theme which you are running right now? A mistake might occur if you download the file, edit it and upload. If you use internal editor, such chances are “less”

Ya I am using an Internal Editor …. editing the comments.php file at wp-admin/theme-editor.php

@ Debajyoti

Could you use txtb.in service to show me what you edited in the file – or even you can send me the comments.php file(edited) through mail so that I can have a look at.

This is useful but we might lose commentator with this…

Leave Your Comments Below / Trackback

About The Author

    Pavan Kumar

    Pavan Kumar completed Engineering in Electronics and Communication in the year 2008. He is very enthusiastic and keen to work on different aspects of computer, internet and mobile related fields. The articles here reflect his creativity. This blog was started as a showcase of solutions for different problems and today it has got a good reputation in the blogosphere. Read More...

© 2020 - TechPavan.com. All rights reserved.

All content provided in this site are the property of TechPavan.com and is free for non-commercial usage. Read our Privacy Policy here.

Any kind content on this site cannot be reproduced in any form without permission of the author. We are not responsible for any loss or damage which may occur due to any of our content.

Site hosted on Bluehost powerful servers.