apan1982
Member
Posted 7 months ago #
Hello.
Is there an easy way to embed some custom code to the page(usually a post page) shown to user after he comments a post?
The code should be shown just once and only to the user who has just commented the post, right after he clicks on "post comment".
Thanks in advance.
apan1982
Member
Posted 7 months ago #
Will the following code work?
add_filter('comment_post_redirect', 'redirect_after_comment');
function redirect_after_comment($location)
{
return $location + '&just_commented=1';
}
and checking just_commented variable on the post page.