(+84) 463.28.7979

Remove Links in Comments on WordPress Blogs


I personally think links in comments are a good way of allowing your readers to add more information and take the discussion to a higher plain. But spammers and comment bots abuse this facility to promote their products and improve their search engine ranking. Lots of people leave links in comments in order to get clicks and backlinks.

As it is one of the biggest nuisance for blogs, how to disable links in comments on your WordPress blog? Here is piece of code that will make URLs in the comment body appears as regular text and not as links. The code has to be pasted in the functions.php file of your WordPress theme.

1 <?php
2 remove_filter('comment_text', 'make_clickable', 9);
3 ?>

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>