[wp-hackers] Allowing future posts
    Hacker Scot 
    shacker at birdhouse.org
       
    Sun Nov 18 06:57:36 GMT 2007
    
    
  
This rocks, thanks much. But there's a bug - while it does allow  
future posts to display now, when viewing a category page with this  
enabled, the loop includes posts from outside the current category.  
Somehow it breaks that part of the loop filter. Any tweaks you can  
suggest for that?
Thanks,
./s
> Date: Sat, 17 Nov 2007 13:33:20 -0500
> From: Kaf Oseo <kaf at szub.net>
> Subject: Re: [wp-hackers] Allowing future posts
>
> #2 is pretty trivial these days:
>
> <?php
> /*
> Plugin Name: Show Future Posts
> Description: Display all posts with a timestamp in the future.
> Version: R1
>  */
>
> function display_future_where($where) {
> 	global $wpdb;
> 		$where .= " OR $wpdb->posts.post_status = 'future' ";
> 	return $where;
> }
>
> add_filter('posts_where', 'display_future_where');
> ?>
--
 >>> Birdhouse Hosting <<<
Custom web and mail hosting services
http://hosting.birdhouse.org
    
    
More information about the wp-hackers
mailing list