I have an ‘actor’ cpt and it seems to automatically get added to the query:
SELECT object_id, term_taxonomy_id
FROM wp_term_relationships INNER JOIN wp_posts ON object_id = ID
WHERE term_taxonomy_id IN (38,40,30,11,32,34,29,39,35,9,31,19,33,37,42,41,27,25,36,1,26)
AND post_type IN ('post', 'actor')
AND post_status="publish"
Call from: require, require_once, include, get_sidebar, get_template_part, locate_template, load_template, require, dynamic_sidebar, call_user_func_array, WP_Widget->display_callback, WP_Widget_Categories->widget, wp_list_categories, get_categories, get_terms, _pad_term_counts
(Using the Debug Queries plugin)
And this is the CPT definition:
register_post_type('actor', array(
'public' => true,
'labels' => $labels,
'has_archive' => 'actors',
'taxonomies' => array( 'category' )
));
Related Posts:
- Post Query not working
- Random image from tag/custom type on sidebar
- Showing posts from different categories and from custom post type
- Custom post type getting wrong categories and tags
- Register widget only page is a singular of custom post type
- Widget: Custom Post Type Post Listing Dropdown on Admin Side
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- Show a Category X’s custom post type on Category X archive page?
- PHP variable not regenerating when publishing multiple posts at the same time
- Multiple level category drop-down from the WordPress dashboard
- 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
- Display Custom Toxonomy In WordPress and theme Widgets category selection dropdown list
- Hide parent categories when clicked, and show it’s childs
- Limit amount of posts made within a custom taxonomy
- Problem with displaying posts in the CPT category
- Filter CPT posts by one or more categories
- Getting categories of posts under a custom taxonomy
- Custom Post Types with a common category for a blog listing
- Can’t remove front from permalinks for custom taxonomy category page
- How to get categories linked in posts for a specific post type
- Custom post type, organized by categories
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- Remove CPT name from permalink but add %category% instead
- Set a checkmark in a category based on a URL-parameter
- WP Query with categories only shows one post and ignores the category
- Custom Widget WP_Query problem
- Adding custom post type to count in category
- How to edit this code to get the categories in achieve page?
- Category with post type pagination returns 404
- Custom Post Type and Category Base Rewrite Issue
- Get the category from custom post type
- Post injections into Site Origins Page builder [closed]
- Custom Post Type + Categories
- How to create a gallery page with categories?
- Hide a widget inside a div on specific type of post
- Custom Post Slug same as Parents Category Slug
- WordPress posts page for customer filtering and sorting along with category filter
- I am having Trouble to get list of Categories of Custom post Type
- Hierarchy and access control for Custom Post Types (CPT)
- Multiple (two) category postings on the same page.
- Loop filtering Custom Post Types and/or Categories
- School & class blogs: Categorize with categories or custom posts?
- Custom post type and category link together
- Why is my category template ignoring post type?
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- How to get custom posts sub category link
- Not sure if I should create multiple custom post type [closed]
- Filter widget outputs
- Cross reference custom post types
- Make a custom_post translatable
- Pre-selecting the category for a custom post type
- browse by category and tags?
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- Categories filtering in new post
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Custom post types and category archive
- List of Posts and Categories
- Set Custom Post Type in Widget Settings for use in Widget
- How can I show 1 featured post in a styled element, and the next few below differently styled
- Want to be able to sign up subscribers as authors
- How do you create a custom template to display a category with an image and related posts below?
- How can I list Custom Post Types created with the Types plugin under categories?
- List Taxonomies: Don’t list taxonomy if it has no post – depending on custom post-meta?
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Custom templates for a specific category
- CPT category hierarchy
- Categorise Custom Post Types
- WP the_posts() on single-cars.php get category link
- Category.php template for custom posts
- How to retrieve category of a post in have_post loop?
- Categories and tags for custom post types
- Create new custom post and post category of same name
- Tag page only display 10 posts
- category page for custom post type
- the_post_thumbnail call removing li in code
- in_category for custom post types
- Get parent category id from child category page for custom taxonomy
- Getting used tags per post type
- Archieve.php not loading for custom post type
- multiple custom post type on category page
- how to set a WP Plugin’s url
- Category archive in with conjunction with custom post type is empty
- Can I restrict category availability?
- WP_Query Custom Post Type if Category ID Equals
- Why does accessing url by category cause issues with post types?
- Custom post types and ‘new WP_Query’
- How can I have different content for different countries?
- How to add current custom taxonomy slug to body class
- Why isn’t a list of posts from my custom post type displaying in this widget?
- Assign category a default post type
- Meta data (Tags and Categories) for Custom Posts not showing.
- Navigate posts with different post type that are in the same categories
- List Posts By Custom Taxonomy
- get_category_link() for custom post type does not include custom slug rewrite?
- How to Display Posts From Category Within a Custom Taxonomy?
- Showing custom post type categories in the menu
- Disable custom taxonomy on admin bar