I hope this is in the correct category. it is a php problem but relates to a wordpress blog. If this is in the wrong area please feel free to move it.

I am using a popup window for people to add comments on my blog.
Everything works fine!

I have now created stand alone pages and included the option to add comments. However when the user clicks "add a comment" the pop up window opens but nothing is displayed.

Now this is due to the piece of code in the comments-popup.php file:
Code:
<?php
/* Don't remove these lines. */
add_filter('comment_text', 'popuplinks');
while ( have_posts()) : the_post();
?>
I am guessing that being as this popup is being called from a page rather than index.php wordpress thinks there are no posts so the loop is not being entered!!

How do i get around this? I know it can be done as i've seen it!

Any help would be appreciated.
cheers