WordPress.org

Ready to get started?Download WordPress

Forums

SI CAPTCHA Anti-Spam
[resolved] Show SI CAPTCHA below comment textarea (3 posts)

  1. m.usama.masood
    Member
    Posted 9 months ago #

    I would to move the SI CAPTCHA field below the textarea and above submit.

    How it possible? Give me hint and I will update code.

    http://wordpress.org/plugins/si-captcha-for-wordpress/

    [Moderator Note: No bumping, thank you.]

  2. m.usama.masood
    Member
    Posted 9 months ago #

    Thanks, I find the solution.
    Si Captcha add captcha field after filter (comment_form_default_fields) in the comment form.

    I have made change in comment.php file in theme folder.
    comment_form();
    replace this with

    <?php
    $comment_args = array(
     'comment_field'        => '',
    'fields' => apply_filters( 'comment_form_default_fields', array(
    		'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
    		            '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
    		'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
    		            '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
    		'url'    => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' .
    		            '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',
    		'comment_field'        => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p><br>',
    		)),
    	);
    comment_form($comment_args); ?>
  3. m.usama.masood
    Member
    Posted 9 months ago #

    Thanks, I find the solution.
    Si Captcha add captcha field after filter (comment_form_default_fields) in the comment form.

    I have made change in comment.php file in theme folder.
    comment_form();
    replace this with

    <?php
    $comment_args = array(
     'comment_field'        => '',
    'fields' => apply_filters( 'comment_form_default_fields', array(
    		'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
    		            '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
    		'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
    		            '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
    		'url'    => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' .
    		            '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',
    		'comment_field'        => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p><br>',
    		)),
    	);
    comment_form($comment_args); ?>

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.