WordPress.org

Ready to get started?Download WordPress

Forums

Comment form (9 posts)

  1. chroniclet
    Member
    Posted 6 years ago #

    I would like to change the text at the top of the comment form from: Leave a Reply to something like: Comment on this article

    Can you please tell how to make this change?

    Thank you!

  2. athique
    Member
    Posted 6 years ago #

    Go to Dashboard >> Presentation >> Theme Editor...

    Then find and edit the text 'Leave a Reply' to whatever you want in your comments file.

    In your case I think the line you want to look for and edit will look like this...

    <h3 id="respond">Leave a Reply</h3>

  3. chroniclet
    Member
    Posted 6 years ago #

    Any idea what file I can find <h3 id="respond">Leave a Reply</h3> in?

    I'm not having any luck finding it.
    Thank you!

  4. athique
    Member
    Posted 6 years ago #

    Go to Dashboard >> Presentation >> Theme Editor...

    It should be in the Comments template file which you can select on the right hand side

  5. chroniclet
    Member
    Posted 6 years ago #

    I looked there, but that text isn't anywhere in the comments.php file. (see the entire file code listed below.) Any idear where else to look?

    Thank you!

    <?php if ( !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>
    <p>Enter your password to view comments.</p>
    <?php return; endif; ?>

    <?php if ( $comments ) : ?>
    <h3>Comments</h3>
    <?php foreach ($comments as $comment) : ?>

    <div class="comment">
    <p class="commenticon">
    <?php comment_type('Comment','Trackback','Pingback'); ?> from <?php if ('' != get_comment_author_url()) { ?>"><?php comment_author() ?><?php } else { comment_author(); } ?>
    <?php edit_comment_link('Edit comment',' | '); ?>
    Time: <?php comment_date() ?>, <?php comment_time(); ?></p>
    <?php comment_text() ?>

    <?php if ($comment->comment_approved == '0') : ?>
    <p>Thanks for your comment! It has been placed in the moderation queue, and if it is approved it will be published here soon!</p>
    <?php endif; ?>
    </div>

    <?php endforeach; ?>
    <?php endif; ?>
    <?php if ( comments_open() ) : ?>
    <?php endif; ?>

    <?php if ( comments_open() ) : ?>
    <div id="commentsection">
    <h3>Write a comment</h3>
    <form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    <p><label for="author">Name:</label>
    <input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" /><input type="hidden" name="comment_post_ID" value="<?php echo $post->ID; ?>" />
    <input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($_SERVER['REQUEST_URI']); ?>" /></p>
    <p><label for="email">E-mail:</label>
    <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" /></p>
    <p><label for="url">Website:</label>
    <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" /></p>
    <p><label for="comment">Your comment:</label>
    <textarea name="comment" id="comment" cols="66" rows="7" tabindex="4"></textarea></p>
    <p><?php do_action('comment_toolbar', 'comment'); ?></p>
    <p><input name="submit" id="submit" type="submit" tabindex="5" value="Submit" /></p>
    <?php do_action('comment_form', $post->ID); ?></form>
    </div>

    <?php else : // Comments are closed ?>
    <?php endif; ?>

  6. Root
    Member
    Posted 6 years ago #

    Its in comments.php regardless. To go much further we need a link.

  7. athique
    Member
    Posted 6 years ago #

    hmmm....in the code you posted above...the relevant bit to edit seems to be <h3>Write a comment</h3>

    Don't know why it says that though because looking at your page source it should currently be saying 'Leave a reply'.

    Are you sure that the code you posted above is directly from your theme editor?

    Anyhow you need to change that text inside the <h3> tag

  8. Root
    Member
    Posted 6 years ago #

    Quite. :)

  9. jplancaster
    Member
    Posted 6 years ago #

    I'd like to change it to say Respond to {post title}. Our comments get spammed on eDelegate.com and I heard that they won't find your site if the spammailer searches for Leave a Reply they won't find it. Is this true? Is there any other way to avoid this spam in comments? I have the api enabled to control it but I still have to go in and moderate hundreds of posts.

Topic Closed

This topic has been closed to new replies.

About this Topic