RunPHP – Breaking Outside The Loop
-
Bit of a difficult one. Basically, I want to have a php page which displays posts in a different way from normal. So I use RunPHP and the following:
<?php
query_posts(‘cat=2’);if (have_posts()) :
while (have_posts()) : the_post();
the_title();
echo (‘
‘);
endwhile;
endif;break;
?>Unfortunately, since RunPHP eval()s stuff inside the loop (as this is the way it works in the template) and I have just called query_posts it then spews out all the posts in Cat=2 in the usual manner. (I think).
Is there anyway to stop this either by breaking out of the loop or otherwise. I guess one could use WP_Query, but for some reason this works, but adds the comment form to the bottom of the page and I’m not sure why.
Thanks a lot.
Alex
- The topic ‘RunPHP – Breaking Outside The Loop’ is closed to new replies.