how to add thank you message after comments wordpress

Many times we got requirement to add thank you message after adding comments added by users.

In this article I will show how to add custom message after getting comments from users. For this we going use the wordpress api. WordPress filters are very useful. You can find all wordpress hooks and filters in wp-includes/default-filters.php file.

function add_custom_text($content) {
return "
<div class=\"custom-text\">
Hello User!
Thank you for your comment.
add_filter('comment_text', 'add_custom_text', 1000);

Open your functions.php file from your active wordpress theme folder. copy paste the following code in that file. This is very simple trick but still it is really useful.

You may like following Articles!

  • N-BOOKаньер

    Хороший пост, прочитав пару книг на тему всё таки не взглянул со стороны, а пост как-то задел.

  • Анекдот

    Автор выйди к напроду, вопросы есть!

  • Gregorio Sanjuan

    My personal favorite is actually Justin Bieber, he’s so attractive!

  • Floyd Christley

    We are a big fan! Appreciate your offering this

  • Grom

    “Классный пост”

  • BernieR

    їPuedo tomar obtener Foto de su sitio


  • Pingback: Como adicionar uma mensagem de agradecimento após um comentários no wordpress | Ajuda Wordpress em Português

  • Avast

    Очень интересно, но все в будущем хотелось бы еще побольше узнать об этом. Очень понравилась ваша статья!

  • Садоводство

    “познавательная тема”

  • hi tech

    Очень интересно! Судя по некоторым откликам ….

  • Садовод

    А будет продолжение новости? Очень было бы интересно почитать

  • Гортани

    Компания “СтройТехноИзоляция” – производство качественных материалов: Пенополиуретан.

  • Варез

    Блоггер, дилема растолкованная вами на блоге несомненно жизненна. Я думаю что тема стоит продолжения в приватной дискуссии. Кстате, у блога непонятное с код-кой RSS. ;)

  • Pingback: Como adicionar uma mensagem de agredecimento após um comentário no WordPress | Ajuda WordPress - Plugins WordPress, Temas WordPress e Dicas

  • NgocDesign

    Thanks post

  • kz

    not woreking

    • Wordpress API

      what issue you are facing tell me.

  • Monte Gowler

    Interesting read, perhaps the best article iv’e browse today. We learn everyday cheers to you!

  • Matilde Ysaguirre

    I’ve just started off a blog, the knowledge you give on this site has aided me extremely. Thank you for all your time & work.

  • Leanne Shulthess

    Good! Thank you! I always wanted to write in my site something like that. Can I take part of your post to my blog?

  • Dan


    you need to start monitoring your comments!

  • creative guy

    waste of time. it broke my whole site. i had to reupload the whole theme files and folder as after pasting this code in my functions.php file gave me a huge parsing error and fuked up my site.

    not good to see it :( this way

  • Felipe Veiga

    Didn’t work for me as well and for the comments, it seems this site has been abandoned.

  • senem

    Thank you very useful information