Support » Plugin: Captcha » Disable captcha on custom wp_login_form in theme file

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Itdah,

    Please try to do the following:
    1) Go to the plugin settings page;
    2) Open Custom code tab;
    3) Mark “Activate” checkbox in the “Editing bws-custom-code.php” section;
    4) Add the following code:

    function add_bws_captcha( $content ) {
        return $content . cptch_display_captcha_custom( 'wp_login', 'cptch_wp_login' );
    }
    add_filter( 'login_form_middle', 'add_bws_captcha' );

    5) Save changes.

    Thread Starter itdahdev

    (@itdahdev)

    Hi bestwebsoft,

    thanks for the fast support and the nearly well working code snippet. One thing is not quite well:
    If Login Captcha is deactivated, the captcha is loaded with your snippet. Please extend the snippet to full firm the plugin settings.

    With best regards from Germany:
    A. Herbert

    Hi,

    You’re welcome!

    Please replace previous code with the following one:

    
    function add_bws_captcha( $content ) {
        global $cptch_options;
        if ( function_exists( 'cptch_display_captcha_custom' ) && ! empty( $cptch_options['forms']['wp_login']['enable'] ) ) {
            return $content . cptch_display_captcha_custom( 'wp_login', 'cptch_wp_login' );
        }
    }
    add_filter( 'login_form_middle', 'add_bws_captcha' );

    Please let us know about the results.

    Thread Starter itdahdev

    (@itdahdev)

    Hi bestwebsoft,

    that’s it! I’m very pleased with your support!

    With best regards from german Developer:
    A. Herbert

    Hi,

    We are glad that everything is fine now. Feel free to contact our support team with any questions in future.

    Have a nice day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable captcha on custom wp_login_form in theme file’ is closed to new replies.