Removing Comments Author Links

Askimet (the anti-spam plugin for wordpress) is great, but when it comes to readers commenting posts and leaving backlinks to their sites, Askimet doesn’t count that as spam unless the message doesn’t look like one. Yeah, wordpress marks them with a ‘nofollow’ attribute, but search engines aren’t the worst case in this situation. It’s pretty good if readers leave backlinks to sites that are more or less relevant to yours, but what if it’s something about travel and hotel bookings? That would piss me off…

You can manually edit the comments and remove backlinks, but you’ll get annoyed doing that with ~100 comments per day. Anyways, here’s a quick tip of how to remove all author links forever.

Go to your wordpress admin panel, pick the ‘design’ section and click ‘theme editor’. Now, in the list on the right you’ll see some files related to the current theme. You’ll have to find the one that’s ‘driving’ comments. This can vary from theme to theme, but most likely it will be called comments.php.

Then find something similar to:

<?php comment_author_link() ?>

And replace it with:

<?php comment_author() ?>

Voila! And no more author links in comments ;) Good luck!

About the author

Konstantin Kovshenin

WordPress Core Contributor, ex-Automattician, public speaker and consultant, enjoying life in Moscow. I blog about tech, WordPress and DevOps.