Jeremy Herve Avatar

That’s me. And my blog. In English and in French.


How to: thank your readers when they comment

When users take the time and effort to add a comment to one of your posts, wouldn’t you like to thank them about it? Here aretwo different methods to thank your users after they commented.

Redirect them to a Thank you page

thank youThe first obvioous solution is to bring them to a new page, where you thank them, and call for further action: keep reading, subscribe via RSS, Like the website on Facebook…

It can be done quite easily by adding a few lines to the functions.php file of your theme. There, replace the URL by the URL of the WordPress page you have created for that purpose.

I would advise you to create a custom page thanks to a page template. Thus you can add some more functionalities to this special landing page.

[php]
// Redirect to thank you page after commenting
function werewp_thanks_commenting() {
return ‘http://domain.com/thank-you’;
}
add_action(‘comment_post_redirect’, ‘werewp_thanks_commenting’);
[/php]

You can have a look at the example of Yoast, and his thank you page.

Send them an email to get in touch with them

As for everything about WordPress, there is always a plugin for that!

Simply install Thank me Later, customize the message you want to send, and you are done!

Do you use one of these methods on your blog? Do you have other ideas to thank people who take the time to comment on your blog? Share it with us!

Reactions on the Fediverse and on the ATmosphere

One response

  1. Abhijit V. Chaore Avatar

    First method of editing functions.php is better as installing one more plug in is something I would try to avoid. Thanks for sharing.



Continuez votre lecture / Keep reading

Discover more posts about or look at some of the posts suggested below.

Jeremy Herve
Jeremy Herve

WordPress, TV Series, music, kids, and board games. I think that’s probably the best way to define me in a few words. 🙂

I work at Automattic where I lead a team building tools for bloggers and creators. I talk a lot about WordPress things, but also about all things open source in general.

I post in English and in French.

I live in Brittany, France, so you’ll also find me sharing pictures from our beautiful region from time to time.

1,241 posts
194 followers