3

私はワードプレスを使用して一部のセラピスト向けのサイトを構築しており、投稿のコメント セクションを使用して、セラピストとの質疑応答を行っています。ただし、「コメントを投稿」ボタンのテキストがどこから来ているのかわかりません。「質問を投稿する」に変更したいと思います。

テーマの comments.php には何もありません。メインの wp-comments-post.php のどこにも見つかりません。

どんな助けでも素晴らしいでしょう!

ありがとう

Web アドレスはhttp://s416809079.onlinehome.us/ask-the-therapist/です。

編集:私の混乱は、「投稿コメント」がどこにも見つからないことです。また、追加しただけではボタンが 2 つになり、新しいボタンは実際には送信されません。これがコードです。

<?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; ?>
4

5 に答える 5

11

Comment Form Codexには、Comment フォームの値のカスタマイズについて知っておく必要があるすべての情報が含まれています。

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

それはあなたが必要とすることをするはずです。

于 2012-10-10T23:44:19.743 に答える
0

テキストを検索して、タグの をpost comment変更するだけです。valuebutton

   <input name="submit" type="submit" id="submit" value="Post a Question">
于 2012-10-10T20:57:10.030 に答える
0

次の要素のvalue属性を変更します。input

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

すべてのファイルで「Post Comment」を検索すると、探しているものが見つかるはずです。

于 2012-10-10T20:57:43.147 に答える
0

入力の値をに設定します<input value="Post a question">

于 2012-10-10T20:57:55.850 に答える
-1

クラスの下でform-submit値を変更します。

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

への変更

...
<p class="form-submit">
<input id="submit" type="submit" value="Post A Question" name="submit">
...
于 2012-10-10T21:02:55.190 に答える