[wp-hackers] 'request' filter for adding custom post types to	blog indexes
    scribu 
    scribu at gmail.com
       
    Wed Aug 11 19:29:36 UTC 2010
    
    
  
Something like this:
         if ( isset ( $request['post_type'] ) :
               $request['post_type'] = (array) $request['post_type'];
               $request['post_type][] = 'my_post_type' ;
         else:
                $request['post_type'] = array ( 'post', 'my_post_type' ) ;
          endif;
It really depends on what else you're doing. Best is to try it out, with
lots of testing.
-- 
http://scribu.net
    
    
More information about the wp-hackers
mailing list