• How can display some message after a comment is successfully published? For example “Thanks for your comment” or something like that?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The comment_post is probably what you want if you want to be sure that the comment was actually successfully saved. But you could probably edit your theme to trigger a message if the post comment button gets pushed.

    Thread Starter levani01

    (@levani01)

    There is practically no information about this function ?? How should I use it?

    If you’re inside a comment callback function, you could try something like:

    <?php if ($comment->comment_approved == '0') : ?> <p class="moderated"><?php _e('This comment is currently in a moderation queue.');?></p>
    <?php else :?>
    <p><?php _e('Thank you for your comment.');?></p>
    <?php endif; ?>
    Thread Starter levani01

    (@levani01)

    Sorry, I forgot to say, I want display this message only for the first page load.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display thanks message after a comment is published’ is closed to new replies.