Support » Themes and Templates » add text to reply intro

  • I would like to edit the statement for the reply/comment intro.
    “Your email address will not be published. Required fields are marked*”

    Where can I find it?

    Barbara

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    It depends on your theme.

    Check comments.php & functions.php to start.

    If you don’t see it there, let us know what theme you’re using and we’ll take it from there.

    Chip Bennett

    (@chipbennett)

    Theme Review Admin

    You need to hook into the comment_form() function that is outputting the comment reply form.

    Specifically, you need to pass the comment_notes_before argument to the argument array, e.g.:

    <?php
    $new_defaults = array (
         'comment_notes_before' => '<p class="comment-notes">' . __( 'YOUR TEXT HERE.' ) . '</p>'
    );
    comment_form( $new_defaults );
    ?>

    Just change YOUR TEXT HERE to whatever you want to display.

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Nice solution – thanks, Chip. In case the OP isn’t familiar with doing this, just to confirm, she would add this to the functions.php theme file, right?

    Chip Bennett

    (@chipbennett)

    Theme Review Admin

    In case the OP isn’t familiar with doing this, just to confirm, she would add this to the functions.php theme file, right?

    No; that code replaces the call to comments_form(), in the comments.php template file.

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Ah – gotcha, thanks for clarifying.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘add text to reply intro’ is closed to new replies.