Redirect WordPress Commenters To A Thank You Page

If you have your own blog you will know important it is to have people comment on it. There are many things you can do to encourage people to comment on your blog.

You can have do follow links in your post so that the commenter will get a link back to there websites as a thank you for the comment. But why not actually say thank you to people who comment on your blog, this can be done by redirecting your commenter to a thank you page you make in WordPress.

Here is a WordPress snippet to add to your functions.php page which will redirect the commenter to a thank you page.

add_filter('comment_post_redirect', 'redirect_to_thank_you_page');
function redirect_to_thank_you_page(){
      wp_redirect('/thank-you-for-your-comment');
      exit();
}

Keep updated with the latest tutorials and snippets.

Join me on Twitter | G+ | Facebook

Comment