• We are using Theme1986 running WordPress 4.9.8
    The theme is fairly simple.
    I installed reCAPTCHA in WP comments plugin but I do not see the reCaptcha in the “Leave a Comment” section.
    I can see that the theme has comments.php file
    I have read a number of other comments in this forum but I have not seen something that solves my issue.
    I have implement reCaptcha successfully with the plug in “Contact Form 7” plugin
    To stop spam I have set that users must be logged in to leave a comment. If you want to log in I have setup a temporary user with id = xrmlabs and password = cPh!D%2Yp@8JL09@N#dfpc)* so you can see the “Leave a Comment” form.
    Can you advise what I need to change.
    thank you

    The comments.php file looks like this:
    <?php
    /**
    * @package WordPress
    * @subpackage theme1986
    */

    // 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() ) { ?>
    <?php echo ‘<p class=”nocomments”>’ . __(‘This post is password protected. Enter the password to view comments.’, ‘theme1986’) . ‘</p>’; ?>
    <?php
    return;
    }
    ?>

    <!– You can start editing here. –>

    <?php if ( have_comments() ) : ?>
    <h3 class=”space” id=”comments”><?php printf( _n( ‘1 Comment’, ‘%1$s Comments’, get_comments_number(), ‘theme1986’ ),
    number_format_i18n( get_comments_number() ), ‘<span class=”normal”>"’.get_the_title().’"</span>’ );?></h3>

      <?php wp_list_comments(‘type=comment&callback=mytheme_comment’); ?>

    <?php else : // this is displayed if there are no comments so far ?>

    <?php if ( comments_open() ) : ?>
    <!– If comments are open, but there are no comments. –>
    <?php echo ‘<p class=”nocomments”>’ . __(‘No Comments Yet.’, ‘theme1986’) . ‘</p>’; ?>
    <?php else : // comments are closed ?>
    <!– If comments are closed. –>
    <?php echo ‘<p class=”nocomments”>’ . __(‘Comments are closed.’, ‘theme1986’) . ‘</p>’; ?>

    <?php endif; ?>
    <?php endif; ?>

    <?php if ( comments_open() ) : ?>

    <div id=”respond”>

    <h3><?php comment_form_title( _e(‘Leave a Comment’,’theme1986′)); ?></h3>

    <div class=”cancel-comment-reply”>
    <small><?php cancel_comment_reply_link(); ?></small>
    </div>

    <?php if ( get_option(‘comment_registration’) && !is_user_logged_in() ) : ?>
    <p><?php _e(‘You must be’, ‘theme1986’); ?> “><?php _e(‘logged in’, ‘theme1986’); ?> <?php _e(‘to post a comment.’, ‘theme1986’); ?></p>
    <?php else : ?>

    <form action=”<?php echo get_option(‘siteurl’); ?>/wp-comments-post.php” method=”post” id=”commentform”>

    <?php if ( is_user_logged_in() ) : ?>

    <p><?php _e(‘Logged in as’, ‘theme1986’); ?> /wp-admin/profile.php”><?php echo $user_identity; ?>. ” title=”<?php _e(‘Log out of this account’, ‘theme1986’); ?>”><?php _e(‘Log out »’, ‘theme1986’); ?></p>

    <?php else : ?>

    <p class=”field”><label for=”author”><?php _e(‘Name:’, ‘theme1986’); ?> <small><?php if ($req) _e(‘(required)’, ‘theme1986’); ?></small></label><input type=”text” name=”author” id=”author” value=”<?php echo esc_attr($comment_author); ?>” size=”22″ tabindex=”1″ <?php if ($req) echo “aria-required=’true'”; ?> /></p>

    <p class=”field”><label for=”email”><?php _e(‘E-mail:’, ‘theme1986’); ?> <small><?php _e(‘(will not be published)’, ‘theme1986’); ?> <?php if ($req) _e(‘(required)’, ‘theme1986’); ?></small></label><input type=”text” name=”email” id=”email” value=”<?php echo esc_attr($comment_author_email); ?>” size=”22″ tabindex=”2″ <?php if ($req) echo “aria-required=’true'”; ?> /></p>

    <p class=”field”><label for=”url”><?php _e(‘Website:’, ‘theme1986’); ?> </label><input type=”text” name=”url” id=”url” value=”<?php echo esc_attr($comment_author_url); ?>” size=”22″ tabindex=”3″ /></p>

    <?php endif; ?>

    <!–<p><small>XHTML: You can use these tags: <?php echo allowed_tags(); ?></small></p>–>

    <p><label for=”comment”><?php _e(‘Message:’, ‘theme1986’); ?></label><textarea name=”comment” id=”comment” cols=”58″ rows=”10″ tabindex=”4″></textarea></p>

    <p><input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”<?php _e(‘Submit Comment’, ‘theme1986’); ?>” />
    <?php comment_id_fields(); ?>
    </p>
    <?php do_action(‘comment_form’, $post->ID); ?>

    </form>

    <?php endif; // If registration required and not logged in ?>
    </div>

    <?php endif; // if you delete this the sky will fall on your head ?>

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘reCaptcha not showing in Leave a Comment’ is closed to new replies.