query_posts() is acting up
-
I’m trying to set up my single post page so that the previous and next posts show in the sidebar, here’s the code i’m using:
<?php
$prev = get_previous_post();
query_posts("p=$prev->ID&showposts=1");
?>
... the loop ...<?php
$next = get_next_post();
query_posts("p=$next->ID&showposts=1");
?>
... the loop ...the first query works fine, the second just shows the same post as the main post on the page. if i reverse them, still it’s only the first one that works fine.
Any ideas?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘query_posts() is acting up’ is closed to new replies.