Created
          March 2, 2012 12:56 
        
      - 
      
- 
        Save pragmatic-web/1958240 to your computer and use it in GitHub Desktop. 
    Add future-dated posts to a WordPress feed
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* Add future posts to RSS feeds */ | |
| function include_future_posts($where) { | |
| global $wpdb; | |
| if ( is_feed() ){ | |
| // add SQL-syntax to default $where | |
| $where .= " OR $wpdb->posts.post_status = 'future' " ; | |
| } | |
| return $where; | |
| } | |
| add_filter('posts_where','include_future_posts'); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment