Edibz - The Geek's Organisation !

Find Out your latest Application, News, how to, Android, Iphone, geek news, Gaming and all devices latest updates

Responsive Ads Here

Monday 1 January 2018

How to block Spam links from WordPress comments

By default, links that are placed in the comments by visitors or members of Wordpress are active links which can be clicked to go to the target site, which is a wide backdoor for spam.


So you can change this mode, and convert links to be just a texts, you should follow these steps:

Go to the Control Panel - Templates - Editor
Choose the functions.php file for the active template in your blog
Before ?> At the end of the file add the following line:
[post_ad]


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

Now save the file and the problem will end

Important Notes:
If you change the theme of the code, you must make the previous modification to the new theme
Always before any modification, get a copy of the file to restore it if there was any problem.

No comments:

Post a Comment