Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Display posts with 'future' status
add_filter('the_posts', 'show_future_posts');
function show_future_posts($posts)
global $wp_query, $wpdb;
if(is_single() && $wp_query->post_count == 0)
$posts = $wpdb->get_results($wp_query->request);
return $posts;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.