BWS Google reCAPTCHA not showing
-
Hello,
I have just installed the plugin BWS reCaptcha, I adjusted the settings to my preferences. Then added this code to my comments.php template:
<?php if( function_exists( 'gglcptch_display' ) ) { echo gglcptch_display(); } ; ?>
Now the captcha IS working but it is NOT showing. When I try to submit a comment it is saying I didn’t enter the captcha. But it does work on my Login page.
So I also tested it on another wordpress installation with the same comment template, same story. Then I stripped the comment template, element by element but it never shows. Does somebody know what I should do?
This is the comments template:
<?php /* The comments page */ // Do not delete these lines if ( ! empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename( $_SERVER['SCRIPT_FILENAME'] ) ) die ('Please do not load this page directly. Thanks!'); if ( post_password_required() ) { ?> <div class="alert alert-help"> <p class="nocomments"><?php _e('Dit bericht is beveiligd met een wachtwoord. Voer een wachtwoord in om dit bericht te bekijken.', 'mijns' ); ?></p> </div> <?php return; } ?> <?php // You can start editing here. ?> <div class="article__comments"> <?php if ( have_comments() ) : ?> <h2 id="comments" class="comments-title"> <?php comments_number( __( '<span>Geen</span> Reacties', 'mijns' ), __( '<span>1</span> Reactie', 'mijns' ), _n( '<span>%</span> Reacties', '<span>%</span> Reacties', get_comments_number(), 'mijns' ) ); ?></h2> <?php the_comments_navigation(); ?> <ol class="comment-list"> <?php wp_list_comments( array( 'style' => 'ol', 'short_ping' => true, 'avatar_size' => 38, ) ); ?> </ol> <?php the_comments_navigation(); ?> <?php else : // this is displayed if there are no comments so far ?> <?php if ( comments_open() ) : ?> <?php // If comments are open, but there are no comments. ?> <?php else : // comments are closed ?> <?php // If comments are closed. ?> <p class="nocomments"><?php _e( 'Reacties zijn gesloten', 'mijns' ); ?></p <?php endif; ?> <?php endif; ?> <?php if ( comments_open() ) : ?> <section id="respond" class="respond-form"> <h3 id="comment-form-title" class="h2"><?php comment_form_title( __( 'Reageer', 'mijns' ), __( 'Reageer op %s', 'mijns' )); ?></h3> <div id="cancel-comment-reply"> <p class="small"><?php cancel_comment_reply_link(); ?></p> </div> <?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?> <div class="alert alert-help"> <p><?php printf( __( 'Je moet ingelogd zijn om te reageren.', 'mijns' ), '<a href="<?php echo wp_login_url( get_permalink() ); ?>">', '</a>' ); ?></p> </div> <?php else : ?> <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> <?php if ( is_user_logged_in() ) : ?> <p class="logged-in-as"> <?php printf( __( 'Ingelogd als <a href="%1$s" target="blank">%2$s</a>. <a href="%3$s" title="Uitloggen">Uitloggen?</a>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( ) ) ) )?> </p> <?php else : ?> <p class="must-log-in"><?php printf( __( 'Je bent op dit moment niet ingelogd. <a href="%s">Inloggen?</a>' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( ) ) ) ) ?></p> <ul id="comment-form-elements"> <li class="comment-form-author"> <label for="author"><?php _e( 'Name', 'mijns' ); ?> <?php if ($req) _e( '*'); ?></label> <input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" placeholder="<?php _e( 'Your Name*', 'mijns' ); ?>" <?php if ($req) echo "aria-required='true'"; ?> /> </li> <li class="comment-form-email"> <label for="email"><?php _e( 'Mail', 'mijns' ); ?> <?php if ($req) _e( '*'); ?></label> <input type="email" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" placeholder="<?php _e( 'Your E-Mail*', 'mijns' ); ?>" <?php if ($req) echo "aria-required='true'"; ?> /> </li> </ul> <?php endif; ?> <?php do_action('comment_form', $post->ID); ?> <p><textarea name="comment" id="comment"></textarea></p> <?php if( function_exists( 'gglcptch_display' ) ) { echo gglcptch_display(); } ; ?> <p class="form-submit"> <input name="submit" type="submit" id="submit" class="button" value="<?php _e( 'Reactie plaatsen', 'mijns' ); ?>" /> <?php comment_id_fields(); ?> </p> </form> <?php endif; // If registration required and not logged in ?> </section> <?php endif; // if you delete this the sky will fall on your head ?> </div>
Thank you in advance.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘BWS Google reCAPTCHA not showing’ is closed to new replies.