Skip to main content

Timeline for Using Query In Post Type Archives

Current License: CC BY-SA 3.0

8 events
when toggle format what by license comment
Feb 27, 2013 at 7:47 comment added Simon That's odd, as the query worked fine when I tested it. The only advice I can give is to try to simplify your code as much as possible and try to isolate what is causing the issue. I often find it useful to leave out most of the query arguments initially, re-adding them one at a time to understand where the conflict/problem stems from. During such testing it is often useful running var_dump($queryObject->request); to verify that the generated SQL is correct, and try running it manually at times.
Feb 26, 2013 at 21:11 comment added Mihad Aiko the have to be because they are shwing on the homepage and the single post page @simon
Feb 25, 2013 at 9:36 comment added Simon I see now that it was already in you initial arguments, sorry about that. I just tested running a query using array( 'post_type' => 'any', 'category_name' => 'some_cat' ) and it worked out fine, as did using an array of post types. Perhaps all post types you are querying doesn't have the default category taxonomy registered (you need to do that manually), or perhaps the posts are not assigned to the specific category term you are querying?
Feb 25, 2013 at 9:16 comment added Mihad Aiko neither of those otions worked :( @Simon
Feb 25, 2013 at 8:29 comment added Simon So, when you go to the archive for Post Type A, do you also want to show Post Type B and Post Type C? That's a little odd, but just add 'post_type' => 'any' or 'post_type' => array('post-type-a', 'post-type-b', 'post-type-c') to the arguments array.
Feb 25, 2013 at 7:24 comment added Mihad Aiko it's still not shoing in the archives.... go to Tv-cafe.com and notice the "Latest In Celebrity" and the "Latest Videos" then go to Tv-cafe.com/one-upon-a-time and notice that they aren't showing from all post types
Jan 30, 2013 at 12:36 comment added Mihad Aiko tried this and it's still doing the same thing, It's only showing from that one post type archive instead of all post type archives
Jan 30, 2013 at 12:18 history answered Simon CC BY-SA 3.0