• Resolved dreamstone

    (@dreamstone)


    Trying to change the location of the hook do_action( ‘comment_form_after_fields’ ); but no success.

    Here is my code:

    <?php
    if (post_password_required()) {
    return;
    }

    if (have_comments()) : ?>
    <section id=”comments”>
    <h3><?php printf(_n(‘One Response ‘, ‘%1$s Responses ‘, get_comments_number(), ‘virtue’), number_format_i18n(get_comments_number()), get_the_title()); ?></h3>

    <ol class=”media-list”>
    <?php wp_list_comments(array(‘walker’ => new Kadence_Walker_Comment)); ?>

    <?php if (get_comment_pages_count() > 1 && get_option(‘page_comments’)) : ?>
    <nav>
    <ul class=”pager”>
    <?php if (get_previous_comments_link()) : ?>
    <li class=”previous”><?php previous_comments_link(__(‘← Older comments’, ‘virtue’)); ?>
    <?php endif; ?>
    <?php if (get_next_comments_link()) : ?>
    <li class=”next”><?php next_comments_link(__(‘Newer comments →’, ‘virtue’)); ?>
    <?php endif; ?>

    </nav>
    <?php endif; ?>

    <?php if (!comments_open() && !is_page() && post_type_supports(get_post_type(), ‘comments’)) : ?>
    <?php global $virtue; if(isset($virtue[‘close_comments’])) {$show_closed_comment = $virtue[‘close_comments’]; } else {$show_closed_comment = 1;}
    if($show_closed_comment == 1){ ?>
    <div class=”alert”>
    <?php _e(‘Comments are closed.’, ‘virtue’); ?>
    </div>
    <?php } else { } ?>
    <?php endif; ?>
    </section><!– /#comments –>
    <?php endif; ?>

    <?php if (!have_comments() && !comments_open() && !is_page() && post_type_supports(get_post_type(), ‘comments’)) : ?>
    <?php global $virtue; if(isset($virtue[‘close_comments’])) {$show_closed_comment = $virtue[‘close_comments’]; } else {$show_closed_comment = 1;}
    if($show_closed_comment == 1){ ?>
    <section id=”comments”>
    <div class=”alert”>
    <?php _e(‘Comments are closed.’, ‘virtue’); ?>
    </div>
    </section><!– /#comments –>
    <?php } else { } ?>
    <?php endif; ?>

    <?php if (comments_open()) : ?>
    <section id=”respond”>
    <?php if ( did_action( ‘jetpack_comments_loaded’ ) ) : ?>
    <?php comment_form(); ?>
    <?php else: ?>
    <h3><?php comment_form_title(__(‘Leave a Reply’, ‘virtue’), __(‘Leave a Reply to %s’, ‘virtue’)); ?></h3>
    <p class=”cancel-comment-reply”><?php cancel_comment_reply_link(); ?></p>
    <?php if (get_option(‘comment_registration’) && !is_user_logged_in()) : ?>
    <p><?php printf(__(‘You must be logged in to post a comment.’, ‘virtue’), wp_login_url(get_permalink())); ?></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 printf(__(‘Logged in as %s.’, ‘virtue’), get_option(‘siteurl’), $user_identity); ?>
    ” title=”<?php __(‘Log out of this account’, ‘virtue’); ?>”><?php _e(‘Log out »’, ‘virtue’); ?>
    </p>
    <?php else : ?>
    <div class=”row”>
    <?php $fields = array(
    ‘author’ => ‘<div class=”col-md-4″>’ . ‘<label for=”author”>’ . __(‘Name’, ‘virtue’) . ( $req ? ‘ <span class=”comment-required”>*</span>’ : ” ) . ‘</label> ‘ .
    ‘<input id=”author” name=”author” type=”text” value=”‘ . esc_attr( $comment_author ) . ‘” ‘ . ( $req ? ‘aria-required=”true”‘ : ”) . ‘ /></div>’,
    ’email’ => ‘<div class=”col-md-4″><label for=”email”>’ . __( ‘Email (will not be published)’, ‘virtue’) . ( $req ? ‘ <span class=”comment-required”>*</span>’ : ” ) . ‘</label> ‘ .
    ‘<input type=”email” class=”text” name=”email” id=”email” value=”‘ . esc_attr( $comment_author_email ) . ‘” ‘ . ( $req ? ‘aria-required=”true”‘ : ”) . ‘ /></div>’,
    ‘url’ => ‘<div class=”col-md-4″><label for=”url”>’ . __( ‘Website’, ‘virtue’ ) . ‘</label> ‘ .
    ‘<input id=”url” name=”url” type=”url” value=”‘ . esc_attr( $comment_author_url ) . ‘” /></div>’,
    );
    $fields = apply_filters( ‘comment_form_default_fields’, $fields );
    do_action( ‘comment_form_before_fields’ );
    foreach ( $fields as $name => $field ) {
    echo apply_filters( “comment_form_field_{$name}”, $field ) . “\n”;
    }
    do_action( ‘comment_form_after_fields’ );?>
    </div>
    <?php endif; ?>
    <label for=”comment”><?php _e(‘Comment’, ‘virtue’); ?></label>
    <textarea name=”comment” id=”comment” class=”input-xlarge” rows=”5″ aria-required=”true”></textarea>
    <p><input name=”submit” class=”kad-btn kad-btn-primary” type=”submit” id=”submit” value=”<?php _e(‘Submit Comment’, ‘virtue’); ?>”></p>
    <?php comment_id_fields(); ?>
    <?php do_action(‘comment_form’, $post->ID); ?>
    </form>
    <?php endif; ?>
    <?php endif; ?>
    </section><!– /#respond –>
    <?php endif; ?>

    How can I change it correctly?

    https://www.ads-software.com/plugins/google-captcha/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi,

    We have received your query and it is now being processed. We will get back to you on this forum as soon as we can.

    Regards,
    BestWebSoft Support Team

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Greetings,

    We would be glad to help you set Google Captcha in your custom form, however, this would be a paid service, since there are so many custom forms out there, and each requires an individual way of pasting the shortcode. For this matter, we will need some time to examine your custom form.

    If you’d like that, please provide all the details on our support forum https://support.bestwebsoft.com/.

    Regards,
    BestWebSoft Support Team

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Moving Captcha at comments page’ is closed to new replies.