Skip to content

Instantly share code, notes, and snippets.

@pinscript
Created November 19, 2011 20:56
Show Gist options
  • Select an option

  • Save pinscript/1379350 to your computer and use it in GitHub Desktop.

Select an option

Save pinscript/1379350 to your computer and use it in GitHub Desktop.
<?php
class FuturePostsWidget extends WP_Widget {
function __construct() {
}
function widget($args, $instance) {
$query = new WP_Query('post_status=future&order=DESC&showposts=10');
printf("%d future posts", count($query));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment