Forums

[resolved] Future posts on the single.php (8 posts)

  1. theApe
    Member
    Posted 3 years ago #

    Can anyone point me in the right direction for what I need to put in the loop on the single.php to have future posts show to everyone and not just logged in admins.

  2. theApe
    Member
    Posted 3 years ago #

    I'm using this in the index.php

    <?php
    $my_query = new WP_Query('category_name=exhibitions&post_status=future&order=ASC&showposts=2');
    while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID;
    ?>
  3. tades
    Member
    Posted 3 years ago #

    theApe, solution is here: http://wordpress.org/support/topic/141099?replies=2

    let me know if work for you

  4. mores
    Member
    Posted 3 years ago #

    excellent, let's all modify core files :)

    Seriously, is there a better way to do this inside the theme, maybe with a hook for the functions.php or something?

  5. Otto
    Tech Ninja
    Posted 3 years ago #

    No. Future posts are not published, by definition.

    If you want them to show, then you have to make them published:

    http://wordpress.org/extend/plugins/the-future-is-now/

  6. mores
    Member
    Posted 3 years ago #

    yeah, I decided to install this plugin after all and it works as it should.
    Thanks.

  7. ShirouJune
    Member
    Posted 3 years ago #

    err... does this plugin actually work? I am with with WP2.7, installed it... and well, nothing happens, is there a configuration thing to do anywhere?...

  8. ShirouJune
    Member
    Posted 3 years ago #

    Ok. I tried everything till I found this plugin:

    http://wordpress.org/extend/plugins/no-future-posts/

    No Future Posts
    changes the post status from “future” to “publish” by Tom Braider.

    Finally single.php dislays future posts to everyone not only admins.

    :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags