[wp-trac] [WordPress Trac] #19985: Query_posts paged not working for subcategories when mixing custom post types

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 8 10:27:46 UTC 2012


#19985: Query_posts paged not working for subcategories when mixing custom post
types
--------------------------+--------------------------------
 Reporter:  novakpeter    |       Owner:  mike@…
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:
Component:  Post Types    |     Version:  3.3.1
 Severity:  major         |  Resolution:
 Keywords:                |
--------------------------+--------------------------------

Comment (by novakpeter):

 Yes, category is not specified. And there is the point with post types
 back.

 This (with category specified):

 {{{
 query_posts(array('post_type'=>array('post','ai1ec_event'),'paged' =>
 $page,'cat' => 16));
 }}}

 loads post of type "post" from categery "16" and IGNORES posts of type
 "ai1ec_event" (posts of this type are not assigned to any categories).

 In my opinion, it should show posts of type "posts" from category 16 and
 all posts of type "ai1ec_event" (and that is what I want) because their
 category is not specified, right? In this way, there is not way to show
 posts of two types, normal posts from specified category and all
 "ai1ec_event" posts...

 So, the bug is now, that parameter "cat" is applied to normal posts, but
 destroys the "add custom post type posts" to the loop.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19985#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list