WordPress.org

Plugin Directory

Captcha by BestWebSoft

#1 super security anti-spam captcha plugin for WordPress forms.

Why the CAPTCHA is missing in the comments form?

The Captcha by BestWebSoft plugin displays the CAPTCHA for those comments forms which were written in the same way as comments forms for the standard WordPress themes.

Unfortunately, the plugin is incompatible with comments forms generated by using SAAS (eg: Disqus or JetPack comments forms).

If you don't use SAAS comments forms, please follow the next steps:

  1. Using FTP, please go to {wp_root_folder}/wp-content/themes/{your_theme}.
  2. Find and open comments.php file. It is possible that the file that is used to display the comment form in your theme called differently or comment form output functionality is inserted directly in the other templates themes (eg single.php or page.php). In this case, you need to open the corresponding file.
  3. Make sure that the file contains one of the next hooks: do_action ( 'comment_form_logged_in_after' ), do_action ( 'comment_form_after_fields' ) or do_action ( 'comment_form' ). If you didn't find one of these hooks, then put the string <?php do_action( 'comment_form', $post->ID ); ?> in the comment form.

I would like to add Captcha to the custom form on my website. How can I do this?

  1. Install the Captcha plugin and activate it.
  2. (Optional) If you want to use own settings for your custom forms (for example, for your contact and sign up forms), please follow steps below:

a. Open "functions.php" file of your theme in the edit mode; b. Add the following lines to the end of the file:

function add_my_forms( $forms ) {
    $forms['form_slug']   = "Form Display Name";
    $forms['form_2_slug'] = "Form 2 Display Name";
    return $forms;
}
add_filter( 'cptch_add_form', 'add_my_forms' );

Please don't use the next form slugs since they are predefined by plugin settings: general, wp_login, wp_register, wp_lost_password, wp_comments, bws_contact, bws_subscriber, buddypress_register, buddypress_comments, buddypress_group, cf7_contact, woocommerce_login, woocommerce_register, woocommerce_lost_password, woocommerce_checkout.

c. Save file changes; d. Go to the "Settings" tab on the plugin settings page (Admin Dashboard -> BWS Panel -> Captcha);

If everything is OK, you will see new tabs with labels which you specified in the "cptch_add_form_tab" hook call function.

e. Switch to new tabs and configure form options on them as you need; f. Click "Save changes";

In case when you don`t want to use own settings for displaying the CAPTCHA in your custom form, the settings from "General Options" tab from the plugin settings page will be used.

  1. Open the file with the form (where you would like to add CAPTCHA);
  2. Find a place to insert the code for the CAPTCHA output;
  3. Insert the following lines:
<?php echo apply_filters( 'cptch_display', '', 'my_contact_form' ); ?>

In this example, the second parameter is a slug for your custom form. If you don`t use the custom form settings (see point 2 of this instructions) you can leave it empty:

<?php echo apply_filters( 'cptch_display', '' ); ?>
  1. After that, you should add the following lines to the function of the entered data checking:
<?php $error = apply_filters( 'cptch_verify', true );
if ( true === $error ) { /* the CAPTCHA answer is right */
    /* do necessary action */
} else { /* the CAPTCHA answer is wrong or there are some other errors */
    echo $error; /* display the error message or do other necessary actions in case when the CAPTCHA test was failed */
} ?>

If there is a variable in the check function responsible for the errors output, you can concatenate variable $error to this variable. If the 'cptch_verify' filter hook returns 'true', it means that you have entered the CAPTCHA answer properly. In all other cases, the function will return the string with the error message.

I got the message "On your site uses functions ... that are deprecated". What should I do?

Starting with version 4.2.3, we have changed the functionality for faster and more correct plugin work. You need to replace the output and response checking for the CAPTCHA in your form according to the instruction by the link http://support.bestwebsoft.com/hc/en-us/articles/202353439 or the appropriate point in the FAQ (see "I would like to add Captcha to the custom form on my website. How can I do this? ").

After making changes, simply close the message in the admin panel.

If you completely updated the CAPTCHA interaction with your form the message will not be displayed any more.

Can I move the Captcha block in the comment form?

It depends on the comments form. If the hook call by means of which captcha works (after_comment_field or something like this) is present in the file comments.php, you can change captcha positioning by moving this hook call.

Please find the file 'comments.php' in the theme and change position of the line do_action( 'comment_form_after_fields' ); or any similar line - place it under the Submit button. In case there is no such hook in the comments file of your theme, then, unfortunately, this option is not available.

I have some problems with the plugin's work. What Information should I provide to receive proper support?

Please make sure that the problem hasn't been discussed yet on our forum (http://support.bestwebsoft.com). If no, please provide the following data along with your problem's description:

  1. the link to the page where the problem occurs
  2. the name of the plugin and its version. If you are using a pro version - your order number.
  3. the version of your WordPress installation
  4. copy and paste into the message your system status report. Please read more here: Instruction on System Status

Requires: 3.8 or higher
Compatible up to: 4.6.1
Last Updated: 1 month ago
Active Installs: 300,000+

Ratings

4.5 out of 5 stars

Support

4 of 8 support threads in the last two months have been marked resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1 100,1,1
100,2,2
100,1,1
100,1,1
100,3,3
100,3,3 0,1,0
100,5,5
100,7,7 100,1,1 100,2,2
67,3,2 100,8,8 100,1,1 100,3,3
100,1,1 82,11,9 100,2,2 0,1,0 100,1,1 100,1,1 100,4,4
100,7,7 50,2,1 100,2,2 100,1,1 100,1,1 100,4,4
100,1,1 100,3,3 100,6,6 100,1,1
100,2,2 33,3,1 100,3,3 100,8,8 100,9,9 100,37,37 100,2,2
100,1,1 100,2,2 100,4,4 67,3,2 100,2,2 100,3,3 100,8,8 100,9,9 100,36,36 100,1,1 100,1,1
100,2,2 100,1,1 100,3,3 100,8,8 100,9,9 100,35,35 100,60,60 100,61,61
100,2,2 100,1,1 100,1,1 0,1,0 100,1,1 75,4,3 100,2,2 100,2,2 100,4,4 100,9,9 91,11,10 100,42,42 100,61,61 100,60,60 100,1,1
98,65,64 100,60,60 100,6,6 100,14,14 100,13,13 100,1,1
0,1,0 100,6,6 100,14,14 100,7,7 100,64,64 100,2,2 100,2,2
100,6,6 100,15,15 100,29,29 86,14,12 100,26,26 100,64,64 100,60,60 100,63,63 100,2,2 100,3,3
100,13,13 100,69,69 100,59,59 100,65,65 100,2,2 100,3,3
100,65,65 94,65,61 98,66,65 100,1,1 100,1,1 100,1,1 100,2,2 100,3,3
100,1,1 0,1,0 100,1,1 80,5,4 67,3,2 100,3,3 100,2,2 100,1,1 100,2,2 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,2,2 100,3,3
100,2,2 100,2,2 100,4,4 100,2,2 100,2,2 100,2,2 100,1,1 100,3,3 100,6,6 100,2,2 100,1,1 100,1,1 100,1,1 100,2,2 100,3,3
100,3,3 100,3,3 100,6,6 100,8,8 100,5,5 100,2,2 100,3,3 100,1,1 100,1,1 100,2,2 100,3,3 100,1,1
100,1,1 100,4,4 80,5,4 67,3,2 67,3,2 100,4,4 100,2,2 100,3,3 100,1,1
100,2,2 100,3,3
100,2,2 100,4,4 100,4,4 100,1,1 100,3,3 100,1,1
0,1,0 100,4,4 100,1,1
100,5,5 100,2,2 83,6,5 50,4,2
100,1,1
100,2,2
100,1,1 100,2,2 0,1,0 57,7,4
50,2,1
100,3,3 100,1,1 0,1,0
100,2,2 100,1,1
100,1,1 100,4,4
100,2,2 100,1,1
100,1,1 50,2,1
100,2,2
100,1,1
100,1,1
100,1,1 100,1,1
100,1,1 0,2,0
100,2,2
50,2,1
100,1,1
0,2,0