rewind_posts after query_posts ?
-
Hey all,
I’m trying to use a loop and query_posts to grab content from a certain page, then rewind_posts to display the rest of the content normally.
It’s an extra section in my header.php:
<?php if (have_posts()) : while (have_posts()) : the_post(); $values = get_post_custom_values("Page Description"); endwhile; endif; ?> <?php if ($values[0]) : echo $values[0]; else : query_posts('pagename=default-description'); if (have_posts()) : while (have_posts()) : the_post(); the_content(); endwhile; endif; endif; rewind_posts(); ?>
But rewind_posts isn’t actually doing anything. The if statement works as expected, but if I’m on a page that doesn’t have anything in Page Description, it calls the default-description page where it’s supposed to AND for every other loop on the page.
Why? I thought rewind_posts was supposed to reset the WP_query…
Any help is greatly, greatly appreciated.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘rewind_posts after query_posts ?’ is closed to new replies.