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
- How to change permalink structure for custom post type and it’s taxonomies?
- Filtering a custom post type by custom taxonomy in archive template
- How to build a complex page structure
- Add category to custom post URL
- Load custom posts with same tag as page
- Hide/Show only specific categories in wp-admin new-post.php
- Get categories for a specific post – Custom post type
- Including a custom post type in the Archives widget
- Template tags to display custom post type posts in category template?
- How can I add single catogory for custom post type?
- WP Query group/order by category name
- How to show custom taxonomy in the permalink?
- Loop through categories and create tab for each
- automatically save custom post type title as a category
- Query custom post types
- Custom Post Types and Categories?
- Set a default category – if the user didn’t select one- before creating a post
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- Weird problem happening with custom taxonmy when creating/updating posts
- Custom Post Types and independent Categories – complex Taxonomy
- Should I use custom taxonomy or custom post type
- How to detect filter in URL in Category page?
- Replace li Items with divs with classes
- showing custom post types of a certain category only
- Get posts from a custom post type by child categories of a parent category
- Custom Post Type Archive Page Filtering
- Get parent categories of custom post type
- How to query_post custom posts within default taxonomy?
- Custom Post Type With Categories
- Display posts from Custom Post Type in category page on front-end
- Random image from tag/custom type on sidebar
- Showing posts from different categories and from custom post type
- Show a Category X’s custom post type on Category X archive page?
- Multiple level category drop-down from the WordPress dashboard
- How to get categories linked in posts for a specific post type
- Category with post type pagination returns 404
- Get the category from custom post type
- How to create a gallery page with categories?
- Custom Post Slug same as Parents Category Slug
- Make a custom_post translatable
- browse by category and tags?
- How to retrieve category of a post in have_post loop?
- Create new custom post and post category of same name
- Get parent category id from child category page for custom taxonomy
- multiple custom post type on category page
- Disable custom taxonomy on admin bar
- Custom Post Type Category URL
- Want a custom query with just one category but from all custom post types
- Custom Post Type Categories URL not displaying posts
- WP Query results showing posts outside of category ID
- How to get the current category with custom posts
- Better approach for a WordPress Inventory
- Showing all posts and custom post types by using one category
- Custom Post Type with modified permalink structure results in 404
- List child categories from parent category on custom taxonomy page
- How to properly use Categories with Custom Post Types
- Custom post type category permalinks and archive pages
- If custom category search then page 2 not found
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
- Can’t Get Parent and Child Categories of Custom Taxonomy to Display
- Show the categories the current post has
- Display custom post types by category
- Searching in multiple category + URL hierarchy in real estate WordPress site
- Custom post type data not displaying If I select the category from the dropdonw
- How to display custom taxonomy term specific post?
- Category permalinks don’t work even after flushing
- How to sort post category using its Description
- Custom WordPress theme not displaying posts from category
- Wanting to list all Post types under a common category
- How to show posts of the same category on a page?
- Do not load the categories in Category.php
- Modify the category post counting function
- Reuse the “category” slug for a custom post type
- How to sort custom post’s category by id from the theme’s function.php?
- Custom post types not displaying per category
- How do I get the posts from single page custom post type from a sidebar to display in a page?
- How To Display Category list from Portfolio post type plugin?
- retrieve custom post image through widget
- Custom post type not being pulled in widget
- Dropdown switching subcategories portfolio
- Filter wp_dropdown_categories Per Post Type
- Custom Post type archives / categories give 404
- Custom post types archive
- Custom Post Type – Admin Columns
- multiple custom post type category selection search
- Problem to show custom post type in archive page category wise
- Category / Custom Post Type permalink issue
- Categories in custom post types
- Limit to add one post per category only
- Sorting custom post types by category?
- Categories and page filtering with pre_get_posts
- How can I sort posts ascending by post title for a specific post type, but on a category archive template?
- fetch meta fields inside a widget
- empty dashboard for custom role
- Get all custom_post_type posts + blog posts from one category in a single query
- How to add post type in masonry posts elementory widget
- Select Category as Page Parent
- Add Category names to post lists of custom post type
- Categorizing Custom Posts in Bulk Based on Title