How to Block Spam Comments in WordPress with reCAPTCHA

I’m sharing my personal experience. After start writing tutorials for this website I got many spam comments daily and just felt annoying. So I felt the importance of useing reCaptcha protection for my website comment. Here is the process.

 

  • Copy and paste Site Key and Secret Key on Settings page.
  • Enable reCaptcha for Comment.

Save and Refresh your website comment section. Hope it will work.

Here is another way to do this thing-

Add this snippet just before the </head> tag.


<script src='https://www.google.com/recaptcha/api.js'></script>

And add this snippet after the <form> where you want to show the captcha.


<div class="g-recaptcha" data-sitekey="6LfkHTUUAAAAABMes57Zjyb5sB-GuOzJF0qI8Rh7"></div>

Hope everything works fine. Thanks

 

Leave a Reply

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