Adding reCaptcha to the Email Sharing Button

How do I add reCaptcha to the Email button

The Email button is great, and you can make it even better by adding a Captcha to the submission form:

reCaptcha for Jetpack

To add the Captcha to your site, follow these steps:

  1. Start by registering on this site. Upon registration for reCAPTCHA v2, you will receive a Public/Site and a Private/Secret key.
  2. Open your site’s wp-config.php file in your favorite text editor, and add the following constants with both reCaptcha keys right before /* That's all, stop editing! Happy blogging. */:
    define( 'RECAPTCHA_SITE_KEY', 'XXXXXXX' );
    define( 'RECAPTCHA_SECRET_KEY', 'XXXXXXX' );
    
  3. Voila! Your email sharing buttons are now protected against spammers!
This entry was posted in Code snippets, Tips & Tricks and tagged , , , . Bookmark the permalink.

Jeremy Herve profile
Jeremy Herve

Jetpack Mechanic 🚀 at Automattic. WordPress, board games, TV Series, music.

Explore the benefits of Jetpack

Learn how Jetpack can help you protect, speed up, and grow your WordPress site.

Get up to 50% off your first year.

Compare plans

Have a question?

Comments are closed for this article, but we're still here to help! Visit the support forum and we'll be happy to answer any questions.

View support forum
  • Enter your email address to follow this blog and receive news and updates from Jetpack!

    Join 112,029 other subscribers
  • Browse by Topic

  • %d bloggers like this: