• I have enabled popup comments, but when someone has commented what appears in the popup box is the full page for the post, all squashed up because it includes the sidebar, rather than just the comments as previously. How do I stop it doing this? See https://www.ashbooks.co.uk/weblog to try it out for yourself.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Here’s a fix that was posted on this issue previously. I don’t know if it is still the same issue, so make backups of the file first. ??

    In wp-comments-popup.php:

    find

    $location = get_permalink($comment_post_ID);

    and replace with:

    $location = (empty($_POST[‘redirect_to’])) ? $_SERVER[“HTTP_REFERER”] : $_POST[‘redirect_to’];
    if ($is_IIS) {
    header(“Refresh: 0;url=$location”);
    } else {
    header(“Location: $location”);
    }

    Thread Starter ash211263

    (@ash211263)

    Thanks. For future reference that should be ws-comments-post.php rather than wp-comments-popup.php, but it worked fine so many thanks.

    I am having the <i>exact</i> same problem and was just about to give up figuring it out using Codex and come and post it here. I will try this solution! Thank you for asking it so I don’t have to!

    OK, I tried; it didn’t work. https://www.laurenisms.com.

    I’m supposed to leave wp_redirect($location); alone, right? That comes right after the $location = get_permalink($comment_post_ID); that I just replaced.

    Help?

    Actually, I’m wrong. My wp-comments-post.php originally said:

    $location = (empty($_POST['redirect_to'])) ? $_SERVER["HTTP_REFERER"] : $_POST['redirect_to'];
    wp_redirect($location);

    It did not say $location = get_permalink($comment_post_ID);

    and adding the if ($is_IIS) didn’t change anything.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Popup Comments Problem’ is closed to new replies.