Disable Autolinking of URL to HTML in WordPress Comments

Here is a small hack to disable the autolinking of url in WordPress comments. As you already know, WordPress converts any url in the comment section to an HTML link automatically and while this is a useful function, it can also be very annoying when people just leave unrelated links and sign their comments with a nest of “Check my sites” links. So here is a small function that will disable this auto linking function in your WP blog.

1. Open your functions.php page and add the following code:

remove_filter('comment_text', 'make_clickable', 9);

Well that’s all. This tweak is specially useful for blogs having to approve lots of daily comments and who are the target of  “sociable” spammers. Try leaving a test comment now with a link in it and check the result.

Divi WordPress Theme

Leave a Reply

Be the First to Comment!

Leave a Reply