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(__( '‹ previous','pilotfish' )); ?></div><!-- end of .previous -->
<div class="next"><?php next_comments_link(__( 'next ›','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; ?>
The Comment Form Codex has everything you need to know about customizing the values of a Comment form.
That should do what you need.
Avoid editing your theme’s files directly as your changes can be overwritten when you update your theme.
I have added a priority of 11 as the default is 10 and your theme may be changing it with the default priority.
The Comment Form Codex has everything you need to know about customising the values of a Comment form.
set the value of the input to
<input value="Post a question">
just search for the text
post comment
and change thevalue
of thebutton
tag for it,Change the
value
attribute for the followinginput
element:If you do a search all files for “Post Comment” you should find what you are looking for.
Under the class
form-submit
change the value.Previous
Change to