Jun 29, 2012

Disable automatic links in comments

Filled under:

Disable automatic links in comments
If you wish to leave links in comments, or at least that these links are not active , you can disable all default.

WordPress, by default, and unlike in the editor, makes any URL that someone put in the comments is " clickable " , ie it becomes a live link.

Of course, you can configure the settings so that all comments with link comment moderation queue stay in but remember that you must adjust personally as default allows comments with a link, only for those with 2 or more.

In any case, a way to prevent outgoing links, and that you really only want to check a reference copy and paste the URL and visit, and incidentally limit the number of outbound links on your site, because an excess of links projections could penalize your SEO is to use this trick.

All you have to do is add the following code to your plugin functions within the file or functions.php in your active theme:

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

Save the changes and you're done, the URLs in the comments and will not turn into links automatically.


Nice trick long ago found in WPrecipes , I never thought of sharing so far

0 comments:

Post a Comment