Preventing Spam with reCAPTCHA

reCAPTCHA is a free service provided by Google which lets you embed a CAPTCHA field to forms on your site to stop posts submitted by robots or abusive scripts.

Note: Directories Pro supports reCAPTCHA v3 and reCAPTCHA v2 ("I'm not a robot" Checkbox).

Setting up reCAPTCHA

Follow the instructions below to setup reCAPTCHA:

  1. Generate Google reCAPTCHA API keys for your site. Make sure to select reCAPTCHA v3 or reCAPTCHA v2 ("I'm not a robot" Checkbox) as the type of reCAPTCHA when registering your site. If you are unsure, we recommend choosing reCAPTCHA v3.

  2. Go to the WordPress administration dashboard and click Directories in the admin sidebar.

  3. Click the Settings tab, then the Frontend Submit sub-tab, and scroll down to reCAPTCHA API Settings section:

    • reCAPTCHA API version - Select the version of reCAPTCHA API that you have chosen in step 1.

    • reCAPTCHA API site/secret key - Enter the API keys generated in step 1.

    • reCAPTCHA score threshold (v3 only) - Set the minimum score required to pass reCAPTCHA. If you are unsure, leave it to the default score (0.5). For more detail, see

    • reCAPTCHA theme (v2 only) - Select the color theme of the CAPTCHA field.



    • reCAPTCHA type (v2 only) - Select the type of CAPTCHA to serve. Note that the challenge popup is displayed only when the user stays on the page for more than 5 minutes.



    • reCAPTCHA size (v2 only) - Select the display size of the CAPTCHA field.



  4. Scroll down the page and press Save Changes.

Adding reCAPTCHA to forms

Follow the steps below to add reCAPTCHA to the listing submission form on the add listing page.

  1. Login to your website if not yet logged in and go to the WordPress administration dashboard.

  2. Click Directories in the admin sidebar.

  3. Under the All Directories tab, click the gear icon in the row of the directory to edit.

  4. Under the Content Types tab, click the dropdown button in the Listing row and then click Manage Fields.

  5. Click the green Add Element button with a plus sign at the bottom of the page.

  6. In the popup window, click the Utility tab, hover over to the reCAPTCHA element and click.

  7. Leave the settings as-is, and press the Add Element button at the bottom of the popup window to add the reCAPTCHA element.

reCAPTCHA can also be added to the claim listing form and the review submission form by repeating the same steps above for Claim or Review instead of Listing.

If custom login/registration forms are enabled, reCAPTCHA can also be added to those forms. See User Login/Registration and Guest Posts for more details.

Force disable reCAPTCHA

If you have enabled reCAPTCHA in your login form and for some reason reCAPTCHA stopped working and you are unable to login, you can add the following line of code to your wp-config.php file to force disable reCAPTCHA:


Make sure to add the line to wp-config.php above where it says:

/* That's all, stop editing! Happy blogging. */

results matching ""

    No results matching ""