[wp-trac] [WordPress Trac] #10791: Allow specific post_types to be specified in query
WordPress Trac
wp-trac at lists.automattic.com
Tue Sep 15 23:53:02 UTC 2009
#10791: Allow specific post_types to be specified in query
-------------------------+--------------------------------------------------
Reporter: prettyboymp | Owner:
Type: enhancement | Status: new
Priority: low | Milestone: Unassigned
Component: General | Version: 2.8.4
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
Comment(by azaozz):
This would probably help when using custom post types too. Wouldn't the
SQL be better using
{{{
elseif ( !empty( $post_type ) && is_array( $post_type ) ) {
$where .= " AND $wpdb->posts.post_type IN ('" . join("','", $post_type)
. "')";
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10791#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list