[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 11:27:56 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: close |
--------------------------+--------------------------------
Changes (by pavelevap):
* cc: pavelevap@… (added)
* keywords: => close
Comment:
Problem with pagination and categories can be solved by using variable
$query_string:
http://codex.wordpress.org/Function_Reference/query_posts#Usage_Note
I suppose that query_posts is used to COMBINE posts based on specified
parameters. So, there will be posts with post types "post" and
"ai1ec_event" AND related to category 16. If you know that there are no
categories assigned to ai1ec_event post type, then there is no sense to
query it this way?
Maybe you should make two separate queries:
1) Select some posts with category 16.
2) Select all posts with post type ai1ec_event.
And then merge selected posts, which can be based for example on published
date...
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19985#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list