You are here: WTF » Documentation » Extended Functionality Methods »

Future Posts

Future Posts

WTF provides you with a simple way to show future posts on your Wordpress site. This will show any posts that you have scheduled to be posted in the future. All you have to do to show future posts is add the following code anywhere in you site:

<?php if(function_exists('wtf_future_posts')) wtf_future_posts(); ?>

This will output an un-ordered list of posts on your page.

Advanced

This method can take two arguments:

wtf_future_posts($showposts, $date_format);
  • $showposts
    • Default – 5
    • Description – How many posts do you want to list. Any numeric value.
  • $date_format
    • Default – 'jS F Y'
    • Description – The format of the date to use. See the PHP Date documentation for more information.

CSS

The output format of the list items in this method is:

{Post Title} <span class="future_date">{Post Date}</span>

This means you can easily style your items by using the .future_date CSS selector to style the date.