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.
WPAPI
</div>
";
}
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!

  • http://obzornoutov.ru/ N-BOOKаньер

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

  • http://www.officeniger.ru/ Анекдот

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

  • http://musicdivassite.com/ Gregorio Sanjuan

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

  • http://musicdivassite.com/ Floyd Christley

    We are a big fan! Appreciate your offering this

  • http://netboat.ru/ Grom

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

  • http://www.bad4dwn.com/ BernieR

    їPuedo tomar obtener Foto de su sitio

    [url=http://www.bad4dwn.com/]BernieR[/url]

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

  • http://www.artemsoft.ru/ Avast

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

  • http://www.sadovo.ru/ Садоводство

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

  • http://news-live.ru/ hi tech

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

  • http://www.ovsad.ru/ Садовод

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

  • http://gortane.ru/ Гортани

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

  • http://mix-fix.ru/ Варез

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

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

  • http://tinhoc.vgo.vn/ NgocDesign

    Thanks post

  • kz

    not woreking

    • http://wordpressapi.com Wordpress API

      what issue you are facing tell me.

  • http://build-muscles.info Monte Gowler

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

  • http://financworld.com 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.

  • http://tourfurther.com 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?

  • http://downwithdesign.com Dan

    Dude,

    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

  • http://www.vejaisso.com Felipe Veiga

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

  • http://www.toptancicekci.net senem

    Thank you very useful information