• I am using a popup window for people to add comments on my blog.
    This works ok when commenting on a post.

    I also have stand alone pages and would like for people to add comments to these static pages using the same popup. However when the user clicks “add a comment” the pop up window opens but nothing is displayed.

    Now i believe this is due to the piece of code in the comments-popup.php file:

    <?php
    /* Don’t remove these lines. */
    add_filter(‘comment_text’, ‘popuplinks’);
    while ( have_posts()) : the_post();
    ?>

    I think that as this is being called from a page “wordpress thinks” there are no posts so the loop is not being entered!!

    How do i get around this? What am i missing as I know you can have comments on a page now.

    Any help would be appreciated.
    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter andy_b

    (@andy_b)

    Is this a hard problem or am i missing something simple?

    I think that as this is being called from a page “wordpress thinks” there are no posts so the loop is not being entered!!

    No – that’s not the cause. If you look at the Loop in page.php, you’ll see that is also uses while ( have_posts()) : the_post(); That’s because it’s part of the basic Loop.

    Have you remembered to add comments_popup_script to header.php for pages?

    Thread Starter andy_b

    (@andy_b)

    Thanks esmi

    You are right, the while loop is present in the page.php file

    I have the line <?php comments_popup_script(600,450); ?> in the header.php file. should there be a separate header.php for pages.

    So the comments window does open and the background gets displayed but then the input fields and the page title does not. it is like i get a blank window!

    any idea what may cause this?

    Thread Starter andy_b

    (@andy_b)

    So esmi,
    what do you think is the issue? i’ve been trying to wok this out -on and off – for about 18 months now! i’m going mad!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘comment popup from a page’ is closed to new replies.