Integrations

WordPress

WordPress plugin for form protection

CAPTCHA Cat WordPress plugin for protecting login, registration, and comment forms.

Full Example

A complete working example is available on GitHub: Captchacat-Integrations/Wordpress

Installation#

  1. Copy the plugin folder to wp-content/plugins/captcha-cat
  2. Activate the plugin in Plugins > Installed Plugins
  3. Go to Settings > CAPTCHA Cat
  4. Enter your credentials and enable protection

Configuration#

Navigate to Settings > CAPTCHA Cat to configure:

SettingDescription
Base URLYour CAPTCHA Cat server URL
API KeySecret key for server-side validation
Site KeyPublic key for the widget

Built-in Protection#

Enable protection for WordPress forms with checkboxes:

  • Login Form - Protects /wp-login.php
  • Registration Form - Protects user registration
  • Comment Form - Protects blog comments (logged-in moderators are skipped)

Custom Forms#

Shortcode

Add the CAPTCHA to any page or post:

[captcha_cat]

PHP Function

Add the CAPTCHA in your theme or plugin:

<?php captcha_cat_render(); ?>

Manual Validation

For custom form handlers:

<?php
$token = $_POST['captchacat-token'] ?? '';
$result = Captcha_Cat_Validator::validate($token);
 
if ($result['valid']) {
    // Process the form
} else {
    // Show error
    echo $result['message'];
}

Hooks#

Filter: Modify Validation Result

add_filter('captcha_cat_validation_result', function($result, $token) {
    // Custom logic
    return $result;
}, 10, 2);

Action: After Successful Validation

add_action('captcha_cat_validated', function($token) {
    // Log successful validation
});

Troubleshooting#

Widget Not Showing

  1. Check that the plugin is activated
  2. Verify your Site Key is correct in Settings
  3. Check browser console for JavaScript errors

Validation Always Fails

  1. Verify your API Key is correct
  2. Check that your server can reach the CAPTCHA Cat server
  3. Ensure your domain is registered in the CAPTCHA Cat Dashboard

Built with precision. Designed for developers.