WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been able to list out pages that are set for future in a custom template like this:


However, when I try to then click on one of the pages listed there I get a 404 (as a non-logged-in user).

How do I alter a thematic page.php template to show a future page?

We are already using a bunch of things in function.php and have a special page template for this particular type of post...

I tried adding the following to the functions.php with add_filter, but it didn't help:

function show_future_where($where) {
    return $where . ' AND (wp_posts.post_status = \'publish\' OR wp_posts.post_status = \'future\')';

BTW, I saw a post about automatically setting a post with a future date would be overridden with 'published' state, but couldn't get that to work.

If I can edit the page template is there something else I can do?

I am using 3.3, if that helps.


share|improve this question
Here is a solution – Shazzad Dec 27 '13 at 10:56

Try this:

$my_query = new WP_Query(array(
    'post_status' => 'future',
    'order' => 'DESC',
    'posts_per_page' => 1,
while ($my_query->have_posts()) {
    echo ' - ';

or this: http://wordpress.org/extend/plugins/show-future-posts-on-single-post/

share|improve this answer
Thanks for responding, but this seems to show the last five posts that are marked future, right? I wanted to just show one post (page, actually) that is marked future on it's single post page... am I misunderstanding the solution? – Chris Butler Jan 28 '12 at 19:24
@Chris Butler: Change showposts=5 to showposts=1 and put the full code into a Page Template(showposts=5) – Jennifer M John Jan 30 '12 at 6:09
You should use posts_per_page param, and not showposts. The latter one is deprecated (it was replaced in 2.1, I guess) – Krzysiek Dróżdż Jun 23 '13 at 11:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.