Advertisement
salmancreation

How to Display future posts

Aug 5th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. How to Display future posts:
  2. Adding this code to your wordpress theme will display a listing of future posts to be published.
  3.  
  4.  
  5. <div id="zukunft">
  6.         <div id="zukunft_header"><p>Future events</p></div>
  7.  
  8.         <?php query_posts('showposts=10&post_status=future'); ?>
  9.         <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  10.                 <div >
  11.                         <p class><b><?php the_title(); ?></b><?php edit_post_link('e',' (',')'); ?><br />
  12.  
  13.                         <span class="datetime"><?php the_time('j. F Y'); ?></span></p>
  14.                 </div>
  15.         <?php endwhile; else: ?><p>No future events scheduled.</p><?php endif; ?>
  16.  
  17. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement