Title: 404 redirect future posts
Last modified: August 20, 2016

---

# 404 redirect future posts

 *  Resolved [Alessio Lo Vecchio](https://wordpress.org/support/users/youon/)
 * (@youon)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/404-redirect-future-posts/)
 * In one of my site I display future posts via WP_Query correctly, but when you
   click on the permalink you are redirected to 404 page.
 * Normal users cannot view the single page of future posts, is possibile to correct
   this via function.php (I don’t like core hacks)?
 * I hope you will understand my problem, sorry for my english 🙁

Viewing 1 replies (of 1 total)

 *  Thread Starter [Alessio Lo Vecchio](https://wordpress.org/support/users/youon/)
 * (@youon)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/404-redirect-future-posts/#post-3083650)
 * ok with a little bit of more research I found this inside a plugin [http://wordpress.org/extend/plugins/show-future-posts-on-single-post/](http://wordpress.org/extend/plugins/show-future-posts-on-single-post/)
 *     ```
       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;
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘404 redirect future posts’ is closed to new replies.

## Tags

 * [wp-query](https://wordpress.org/support/topic-tag/wp-query/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 1 participant
 * Last reply from: [Alessio Lo Vecchio](https://wordpress.org/support/users/youon/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/404-redirect-future-posts/#post-3083650)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
