- category_name should take a string, not an array I believe
- post_type is not mentioned as an arg, and thus defaults to ‘post’
so try:
$args = array(
'post_type' => 'any', //or use cpt slug as string, or array of strings if multiple
'category_name' => 'budget', //use 'budget,premium' if you want posts with budget OR premium, use 'budget+premium' if you want budget AND premium.
);
$this_query = new WP_Query( $args ); ?>
Related Posts:
- Get the first post term
- Add Category Taxonomy Support to Custom Post Type
- Exclude a category from WP_Query
- Custom Post Types on Category Pages
- How to display regular posts & custom post types that fall under a category using just the generic category template?
- WP_Query ignores post_type in category view
- How to filter custom post types by custom category taxonomy
- How to list all categories and tags in a page?
- Pagination not working with custom category template
- remove support for ‘Categories’ for a custom post type
- Remove date and category filters when editing custom post types
- How can you make permalink work for custom post type and taxonomy?
- Anyway to assign custom post types to a specific category?
- List with categories, subcategories and posts of custom posttype
- wp_list_categories and custom post types
- Structuring a product catalogue in WordPress [closed]
- Automatic category for a Custom Post Type
- WP_Query with custom post_type and cat retrieving unwanted posts with the custom posts
- How can i list custom post type categories?
- Query Custom Post by Category
- How to display the categories of the post? (custom post type)
- Display Custom Category (taxonomy) Name in Custom Post Type
- Showing Custom Content in a Nav Dropdown
- Show Post Count of a Category
- CPT posts listed by category with custom rewrite URL, please help!
- Multiple custom post type loops in category.php
- Add category in post type dynamically
- Filter categories of posts with checkboxes
- Use post as category
- How to get the post type from a category id?
- Insert HTML inside link in a walker
- Use regular category with custom post types
- Set menu active state for custom posttype and category, given custom taxonomy term
- Display all posts in main category and 1 subcategory
- Getting posts under the custom post type ui category
- Separate custom categories from default category
- Custom post type getting wrong categories and tags
- How to display custom taxonomies with links in filter menu?
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- Add custom post type settings to wordress default posts
- Hide parent categories when clicked, and show it’s childs
- Custom post type, organized by categories
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- Multiple (two) category postings on the same page.
- School & class blogs: Categorize with categories or custom posts?
- How to get custom posts sub category link
- CPT category hierarchy
- WP the_posts() on single-cars.php get category link
- Can I restrict category availability?
- get_category_link() for custom post type does not include custom slug rewrite?
- Targeting categories in custom fields
- How to include category name/id in wp_query for retrieving “custom post type” from a particular category?
- Assigning a category to a custom post type in WordPress
- Stores category posts in an array
- category list with cutom post count
- Include custom post type custom taxonomies in Categories widget
- Get category if used in a custom post type
- custom query with custom post type and category slug
- WordPress custom post categories and subcategories on category.php
- Use post in multiple places on a page with multiple posts
- Can’t pull posts of a Custom Post Type based on the custom taxonomy of the CPT
- Archive Template being used instead of Category Template for Custom Post Type
- Custom post type specific category box
- Custom Taxonomy Taxonomies of Same Name point to first created URL
- category.php not showing custom post types
- Post category behave like a Post in back office menu
- Save data is post using php front end
- Modify category permalink to use post type slug
- How to output custom post type title on custom page with category next to it?
- How to set “section categories”?
- Cannot use object of type WP_Error as array display category
- Create custom post type categories
- Cannot get to work tax_query array for terms
- Set a Default CPT taxonomy by taxonomy id
- Automatic Set Category For A Custom Post Type
- how to create custom taxonomy drop downs for parents and child
- Page + Custom Post Type with same category
- Only show categories that have posts within custom post type
- Loop through a specific parent category
- Query the title of the page to show posts with matching category in the loop
- How to create groups like that in buddypress?
- Getting list of Categories for Custom Post Types
- can’t see categories in appearance-menu-categories
- Can’t seem to filter wp_query by current category ID
- Custom post type URL – filter by taxonomy
- Custom Post Type + Category archive
- How to query all custom posts of a certain type and checking what category they have
- Exclude categories For Custom post types
- Post Editor: display categories from current post type taxonomy only?
- Show custom post type in archive page by category
- I have a custom post type that I want to query a dynamic category name from a custom meta field
- Display all post types together
- Trying to create hierarchy between 3-4 custom post types
- Displaying wp post categories into my custom metabox
- WordPress custom post type post and category links 404
- Custom post type and category permalinks
- Bulk edit for custom taxonomy
- One set of categories for multiple custom posts
- Choose custom post type template by category
- Are custom posts included when getting a categories’ posts?