Get query with custom posts and custom post types via custom taxonomies
-
I am looking to display some featured objects at the top of my site, based on category/taxonomy, for multiple types.
Basically, I have a custom post type, “Reviews” that has a custom taxonomy, “Platforms”.
Platforms has an entry called “PC”.
I also have my standard “post” type, which has categories including “PC”.
I’m looking to display anything that has a category/platform set to “PC”. Basically I want to show the user everything that has to do with PC, whether it be a normal post or my custom Review type.
It looks like it has grouped the PC category and PC taxonomy with the same ID in the wp_term_taxonomy table.
When I use the following it gets me all posts that have the category of “PC” applied to them.
query_posts('showposts=3&cat=78&offset=0&post_type=post');
How do I add the “Reviews” with a platform of PC to the list? I’ve tried many things, including..
query_posts('showposts=3&cat=78&offset=0&post_type=reviews&post_type=post&platforms=pc');
But I can’t get it to return the custom post type..
- The topic ‘Get query with custom posts and custom post types via custom taxonomies’ is closed to new replies.