WordPress.org

Ready to get started?Download WordPress

Forums

"Next Page" link doesn't work after adding <?php query_posts('post_status=future (5 posts)

  1. parthatel
    Member
    Posted 6 years ago #

    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?

  2. parthatel
    Member
    Posted 6 years ago #

    any help, basically just tell me how to show future posts without messing up the next and previous page links.

  3. Alex Concha
    Member
    Posted 6 years ago #

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

    <?php query_posts('post_status=future,publish'); ?>
    ...
    Loop posts
    ...
    <?php wp_reset_query(); ?>
  4. parthatel
    Member
    Posted 6 years ago #

    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?

  5. DDDDvvVVV
    Member
    Posted 5 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.