WordPress.org

Support

Support » How-To and Troubleshooting » “Next Page” link doesn’t work after adding <?php query_posts(‘post_status=future

“Next Page” link doesn’t work after adding <?php query_posts(‘post_status=future

  • I added <?php query_posts(‘post_status=future,publish’); ?> because I needed to show future posts in my site along with the published posts. But when I added that, my “Next Page”, “Previous Page” didn’t work.

    Is there any way around this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • any help, basically just tell me how to show future posts without messing up the next and previous page links.

    Use wp_reset_query(); after you finish showing your future posts:

    <?php query_posts('post_status=future,publish'); ?>
    ...
    Loop posts
    ...
    <?php wp_reset_query(); ?>

    when i put <?php wp_reset_query(); ?>, only the latest future post shows. All the other future post somehow disappear, almost as if they don’t exist (when I search the future posts, they don’t show up either). Maybe there’s something I’m doing wrong?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘“Next Page” link doesn’t work after adding <?php query_posts(‘post_status=future’ is closed to new replies.
Skip to toolbar