Viewing 2 replies - 1 through 2 (of 2 total)
  • Actually it is the same page with anchor (#) link which is probably generated by “wp-comments-post.php”

    I tried several options, using css, JS and php, but could not find a way.

    I am stuck there. I dunno if you have found a solution. But if so, i would be grateful if you share it here.

    Thanks.

    For those having the same problem, i finally managed to overcome that issue.

    I just pasted the code below into the very end line of ‘functions.php’.

    add_filter('comment_post_redirect', 'redirect_after_comment');
    function redirect_after_comment($location)
    {
    return $_SERVER["HTTP_REFERER"];
    }

    “wp-comments-post.php” redirects to the same page with an anchor link, thus focusing to the comments section. But it should still show the inner content by scrolling up. But the theme hides inner content.

    I still don’t know what generates that problem, but the solution is simple. Just copy and paste, VOILA.

    Hope it helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Comments redirect to a new page /#comment-12’ is closed to new replies.