
Do you ever wished to be able to use WordPress to list future events? This can be very useful for exemple if you’re using WordPress for a band website and like to list your future shows.

Do you ever wished to be able to use WordPress to list future events? This can be very useful for exemple if you’re using WordPress for a band website and like to list your future shows.
To achieve this recipe, simply paste this code where you'd like you future posts to be displayed:
<div id="zukunft">
<div id="zukunft_header"><p>Future events</p></div>
<?php query_posts('showposts=10&post_status=future'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div >
<p class><b><?php the_title(); ?></b><?php edit_post_link('e',' (',')'); ?><br />
<span class="datetime"><?php the_time('j. F Y'); ?></span></p>
</div>
<?php endwhile; else: ?><p>No future events scheduled.</p><?php endif; ?>
</div>
43 Responses
There is a WordPress plugin which incorporate this feature, Upcoming Post. Check out my post for more information about showing future post without touching PHP code.
The answer is yes. I want to list the future post, so people will be eager to read it. I have always wanted to do so.
Thanks for this tip. It will be helpful for my new upcoming blog.
What I need is a way to incorporate this in the admin dashboard of our multi author blog. Can I maybe modify one of the standard elements that I do not use?
Well, I added the code into a sidebar and it didn’t work. While I do have a few upcoming posts it showed nothing.
Your tip about highlighting author comments didn’t work for me either. And yes, I am using WP 2.7
thanks
thank you for this nice information.
The answer is yes. I want to list the future post, so people will be eager to read it.
This is great. I wandered here by accident I think I’ll stay. I haven’t reead past the first couple posts but I’ve already found so many useful information – I could certainly use the list like that for listing my upcoming reviews. Keep up the good work.
Nice post. Every time I read this blog I realize more how useful is it.
thank you vety much for this useful information.
thanks bro ..very useful !
Hey,
I want to use this code to display a list of forthcoming gigs, but with the ability for users to view the full post, not just the title. I’ve added a link to the post, but this only works for admins, non admins just get a 404 page. Is there any way non admins can view unpublished post?
Thanks
Jon
thank you for the code – like it =)
Great, and now visit this query on a page as a guest…
no posts found!
thank you for this nice information.
Trackbacks: