Here is a code snippet I’ve made with the help of someone on the WP forums. I’ve also made a website which acts as a calender/overview for future posts by users.
A while later I will publish it as a plug-in which does the same trick.
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;
}
This code allows to show any future post on a post view page only, so your visitors can access a future post pages only if they have a direct link. As you understand you can set any condition instead of is_single, even you can remove any conditions and show future posts everywhere on your website.
