Post Pic

WordPress hack: Remove autolinks in comments

By default, WordPress automatically turns urls left in the comment form into links. This can be useful, but as there’s lots of spammers on the internet, you might want to remove this feature.

To remove automatic linking of urls in comments, simply open your functions.php file and paste the following:

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

That's all! Once saved, you can say bye bye to spammy links in comments.

This recipe has been initially published on CatsWhoCode. Don't forget to read CWC's list of 10 new WordPress hacks!

5 Responses

Nov 17 2011 03:21

It worked for me! Thank you very much.

Jan 28 2012 16:35

It worked for me too!
Thank you very much.

Feb 17 2012 20:20

I could’nt find where to put the code, but I found an other solution :

Open the file function.php, find the function twentyten_comment() and replace
sprintf( ‘%s‘, get_comment_author_link() ) );
by
sprintf( ‘%s‘, get_comment_author() ) );

\o/ Yeah !

Mar 06 2012 14:23

This doesn’t work for me

Nov 12 2012 16:26

Looks to be an Interesting options

Trackbacks:

Leave a Comment

* Name, Email, Comment are Required

WP Theme of the week

Sponsored Likebox