3
votes

I am building a site for some therapists using wordpress and am using the comment section of a post for a question and answer with the therapists. However I cannot find where the text is coming from on the "post comment" button. I would like to change it to "Post a Question".

The comments.php in the theme has nothing about it and I cannot find it anywhere in the main wp-comments-post.php

Any help would be great!

Thanks

The web address is http://s416809079.onlinehome.us/ask-the-therapist/

Edit: My confusion has been that I cannot find the 'post comment' anywhere. Also if I just add it then there becomes two buttons and the new one does not actually submit. Here is the code.

<?php
/**
 * Comments Template
 *
 * @file           comments.php
 * @package        Pilot Fish
 * @filesource     wp-content/themes/pilot-fish/comments.php
 * @since          Pilot Fish 0.1
 */
if ( post_password_required() ) : ?>
<p class="nocomments"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'pilotfish' ); ?></p>
<?php /* Stop the rest of comments.php from being processed */
        return;
endif; ?>

<?php if (have_comments()) : ?>
<h6 id="comments"><?php comments_number(__('No Response to', 'pilotfish'), __('One Response to', 'pilotfish'), __('% Responses to', 'pilotfish')); ?> <i><?php the_title(); ?></i></h6>

<ol class="commentlist">
    <?php wp_list_comments('avatar_size=60'); ?> 
</ol>

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav class="pager">
    <div class="previous"><?php previous_comments_link(__( '&#8249; previous','pilotfish' )); ?></div><!-- end of .previous -->
    <div class="next"><?php next_comments_link(__( 'next &#8250;','pilotfish', 0 )); ?></div><!-- end of .next -->
</nav><!-- end of.pager -->
<?php endif; ?>

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

<?php
$fields = array(
    'author' => '<p id="comment-form-author">' . '<label for="author">' .     __('Name','pilotfish') . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
    '<input id="author" name="author" placeholder="'. __('name (required)', 'pilotfish').'" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30" /></p>',
    'email' => '<p id="comment-form-email"><label for="email">' . __('E-mail','pilotfish') . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
    '<input id="email" name="email" placeholder="'. __('email (required)', 'pilotfish').'" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30" /></p>',
    'url' => '<p id="comment-form-url"><label for="url">' . __('Website','pilotfish') . '</label>' .
    '<input id="url" name="url" placeholder="'. __('website', 'pilotfish').'" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></p>',
);
$defaults = array('fields' => apply_filters('comment_form_default_fields', $fields));
comment_form($defaults);


?>
<?php endif; ?>
5

5 Answers

11
votes

The Comment Form Codex has everything you need to know about customizing the values of a Comment form.

$defaults = array(
    'fields' => apply_filters('comment_form_default_fields', $fields),
    'label_submit' => __('Post a Question')
);
comment_form($defaults);

That should do what you need.

0
votes

set the value of the input to <input value="Post a question">

0
votes

just search for the text post comment and change the value of the button tag for it,

   <input name="submit" type="submit" id="submit" value="Post a Question">
0
votes

Change the value attribute for the following input element:

<input type="submit" value="Post a Question" id="submit" name="submit">

If you do a search all files for "Post Comment" you should find what you are looking for.

-1
votes

Under the class form-submit change the value.

Previous

...
<p class="form-submit">
<input id="submit" type="submit" value="Post Comment" name="submit">
...

Change to

...
<p class="form-submit">
<input id="submit" type="submit" value="Post A Question" name="submit">
...