How to NOT automatically redirect to comment after submit?
-
Hey everyone,
I’m looking for a way to redirect people who comment on a post back to that post rather than to their comment.
Anybody know what to do? I’ve tried messing around with the bottom few lines of code in wp-comments-post.php but I’m not very experienced in code:
$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id; $location = apply_filters('comment_post_redirect', $location, $comment); wp_redirect($location); ?>
Am I in the right direction? Anybody have any suggestions?
Thanks for your time!
-Matsim
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to NOT automatically redirect to comment after submit?’ is closed to new replies.