query_post() and Main Loop Strangeness
-
Hi, all,
query_post() in my replication of the main loop is not acting like I expect it to. Of course, I don’t entirely understand how it works so I could just be using it wrong. How is it that the following code:
include ('blog/wp-blog-header.php');query_posts('cat=1&showposts=10');
if (have_posts()) :
//now run a new query
query_posts('cat=1&showposts=10');while (have_posts()) :
the_post();
echo '<b>';
the_date();
echo '</b>: <a href="';
the_permalink();
echo '">';
the_title();
echo '';
endwhile;
endif;Can generate this the content at this page?
Specifically, note that there are two posts on 5/25 but the call to the_date() is returning an empty string for the second one. Why is that?
Thanks,
Scott
- The topic ‘query_post() and Main Loop Strangeness’ is closed to new replies.