As far as I know there is no such parameter as post_type_cat
, you want to use either cat
or if querying posts in a custom taxonomy you would use a taxonomy query.
Category query example;
$query = new WP_Query( 'cat=2,6,17,38' );
or
$query = new WP_Query( 'category_name=staff' );
See the following Codex entry for even more ways to query by category;
http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters
Taxonomy query example;
$args = array(
'post_type' => 'post',
'tax_query' => array(
array(
'taxonomy' => 'people',
'field' => 'slug', //can be set to ID
'terms' => 'bob' //if field is ID you can reference by cat/term number
)
)
);
$query = new WP_Query( $args );
See this entry for more details:
http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters
Related Posts:
- Multiple orderby values in WP_Query
- How to set a custom post type to have viewable future posts
- How to display only top level posts in loop via WP_Query?
- Search multiple custom fields by using meta_query
- category__in not working on custom post type
- Displaying Posts Related to Other Posts by a Taxonomy Term?
- Date query for a custom meta field
- Querying Posts by Taxonomy From Alternate Network Site
- How to query for posts (in hierarchical custom post type) that have children?
- Set default option in dropdown of WP_Query?
- Combine tax_query and meta_query in WP_Query
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- WP_Query pagination using only numbers instead of /page/1 on URL
- Query for posts in 2 taxonomies
- Parent / Child formatting in a list of post of a custom post type
- How do I create an archive page for standard posts?
- Multiple post type queries (with specific arguments for each)
- Custom WP_Query not returning results when querying custom post type
- Custom Post Type Loop within Shortcode
- Combining sorted and random CPT
- How to add post_type=value when editing that post type in the WordPress admin?
- Display CPT posts based on specific taxonomy
- WP_Query: include custom post type only with specific meta value
- showing custom post types of a certain category only
- Filtering WP_Query Dynamically on the Front-End
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Problem querying Custom post type by custom fields
- Custom post taxonomies as tax_query terms?
- Query Multiple Custom Posts by Custom Fields
- Custom taxonomies relationship
- Prioritize posts in query by meta keys?
- WP_Query orderby and tax_query
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Different Ways to Query Custom Post Types?
- Possible to filter custom post type with multiple meta data?
- can these 3 queries be re-written as 1 query?
- cannot override post_types in WP_Query()
- Wrapping x posts in html without leaving empty html
- Loop for custom post types filtered by a taxonomy
- Loop increase number
- Custom filter for main search: how to exclude specific post_type from search results
- Is This Code Efficient – Or is there a better way?
- Inefficient Query Confusion
- how to get this tax_query working?
- find custom post type post by searching its custom field with my string
- wordpress lists similar type of posts in a custom post type
- FacetWP paging custom wp_query
- Custom post type and custom taxonomy 404 on page 2
- Cannot get custom posts by category
- Shortcode with WP_Query more than once on one page
- Can’t change posts per page in WordPress Post Type Query
- Creating a Tabbed Widget
- list posts of two post types in a single template
- Using WP meta query to show custom post types by a start and finish date
- All blog posts are not showing up
- How do I list a custom field and custom taxonomies for each result in a loop?
- Find Posts based on Child Post value
- Wp Meta Query does not work while simple Query Works
- set object terms after some some time of published post – functions.php
- Change search query in wordpress custom post type
- Sort custom posts by date and then by taxonomy
- Query custom post type that has a serialized relational advanced custom field value
- Display related CPT with custom taxonomy
- build child and anchestor three from post parent
- How can I query and sort custom-post type using WP_Query
- Custom query result empty on page 2
- How select query is generated in a Custom Post Type?
- WordPress doesn’t respect Page slug in custom post type url pagination. Keeps getting removed
- Output all terms slugs for a loop filter
- WP_query sort by taxonomy
- Post Query , breaks layout if a post is deleted
- Linking posts together with Advanced Custom Fields “both ways”
- Not able to get my custom search result using meta_query and tax_query together?
- Multiple WordPress Sites, Same Database but Filtered Content
- Custom Field as Custom Post type element class
- Display posts on parent post if author coincides
- WordPress query in which condition uses custom field
- WordPress loop add heading before first of type
- How to get Current week and current date record wp query
- Error in WP Query. If variable is empty it is displaying previous post value
- Custom post type not being pulled in widget
- WP_Query function for custom post type
- How to pass taxonomy terms to WP_Query along with $args?
- Modify shortcode to work with custom taxonomies and slugs
- Query posts from multiple post types sorted by overarching menu order
- Custom Taxonomy Query by Taxonomny not working
- query and paginate multiple post types
- Custom Post Type meta oembed html output resulting in WSoD
- Query posts by a type and another type only if post is in specific category
- Custom Query With Multiple Meta Key Value
- WP Query Post Type with same Taxonomy name
- shortcode for recent custom type post
- next_posts_link returns same content of 1st page
- how to pass args for archive.php query?
- How to sort custom post type by multiple custom fields?
- Display ACF object field data using Elementor Custom Query
- WordPress custom field sorting, weird behavior: the latest post is at the end
- Default WordPress Query for a Specific Custom Post Type URL
- Sort ACF by custom taxonomy
- Dynamically count the number of custom post types associated to a custom taxonomy