Viewing 6 replies - 1 through 6 (of 6 total)
  • MichaelH

    (@michaelh)

    Don’t quite understand the need for displaying a future post on a blog, but try this:

    <?php
    $posts=get_posts('post_type=post&post_status=future');
    if ($posts) {
      foreach($posts as $post) {
        setup_postdata($post); ?>
        <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
        <?php
      }
    }
    ?>
    Thread Starter moikirsch

    (@moikirsch)

    I can get the posts without a problem… the issue is when you click on the permalink.

    Single.php returns a 404.

    The reason to display this is to be able to post about future events, classes, etc.

    Thread Starter moikirsch

    (@moikirsch)

    One reason for this would be to allow posts of a certain category—say, “Events”—to be used in an “upcoming events” listing. That is what I want to use this for.

    How can I get a scheduled (published, but future-dated) post to actually appear if you are not logged in? I have the sidebar list set up. It has two sections: Recent Posts and Upcoming Events. The latter shows only scheduled posts with the category “Event.” The problem is, when I click on the event, I get the 404 error, like moikirsch.

    I’m looking for a solution this exact same problem and I would prefer not to use a plugin.

    Anyone????

    I concocted a way to do this using page templates and custom widgets. It involves a little more than just activating a plugin, but it]s pretty simple and does the trick.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Allow to view posts in the future’ is closed to new replies.