category__in
will never work as you aren’t making use of the build in taxonomy category
. You are actually making use of a custom taxonomy called tagbbt
. Take a look at this post, I have explained what the differences are
For custom taxonomies, you need to make use of a tax_query
Here is an example
$args = array(
'post_type' => 'bbt',
'tax_query' => array(
array(
'taxonomy' => 'tagbbt',
'field' => 'term_id',
'terms' => array(90,89),
),
),
);
$query = new WP_Query( $args );
Related Posts:
- WP_Query by a category id and a custom post_type
- Exclude a category from WP_Query
- WP_Query ignores post_type in category view
- List with categories, subcategories and posts of custom posttype
- New WP_query in template not working with CPT+category on some pages
- WP Query group/order by category name
- List all custom post type posts from a given category?
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- WP_Query with custom post_type and cat retrieving unwanted posts with the custom posts
- Query Custom Post by Category
- Loop through categories and create tab for each
- Getting all custom posts with a certain category
- Query Custom Post Types & category_name?
- Show Post Count of a Category
- CPT posts listed by category with custom rewrite URL, please help!
- Querying Term Posts in Loop
- Pagination on category page with custom post types
- How to show CPTs in term archive
- showing custom post types of a certain category only
- Linking to the most recent post in a Custom Post Type
- Show custom post type filtered by category
- forming WP_Query for posts of all post types but from specific categories
- WP Query with categories only shows one post and ignores the category
- Why is my category template ignoring post type?
- WP the_posts() on single-cars.php get category link
- WP_Query Custom Post Type if Category ID Equals
- Custom post types and ‘new WP_Query’
- How to include category name/id in wp_query for retrieving “custom post type” from a particular category?
- List categories, subcategories and posts from custom taxonomy and custom post type
- WP Query results showing posts outside of category ID
- How to get Custom Post Type with Categories wise in WordPress using wp_query
- Create query for both custom post type and category
- How to properly use Categories with Custom Post Types
- How to output custom post type title on custom page with category next to it?
- Custom Post By Category
- Only show categories that have posts within custom post type
- Query the title of the page to show posts with matching category in the loop
- Only show current category post
- Can’t seem to filter wp_query by current category ID
- Custom Post Type + Category archive
- category_name not working in WP_Query
- Get all custom_post_type posts + blog posts from one category in a single query
- Using tax_query to get single post per category
- Are custom posts included when getting a categories’ posts?
- Is it possible to make is_category() recursive?
- How do I get a meta value from WP_Query?
- Custom permalink with pagination
- How to get a list of term names of the custom post type im currently on in single.php
- Custom wp_query pagination – next_posts_link() or wp_pagenavi() always empty
- Categories or Custom Post Type to Organize Content
- Custom post type taxonomy template
- Re-order posts in query after
- How do I Use Nested Loops of Custom Post Types for MultiSite Blogs using WP_Query()
- Page naming when there is a sub-category only sometimes.
- Impossible to get Attachments Outside WordPress?
- Category page only displaying the posts from a custom type
- Help Structuring Query for Archive Pages
- Is it possible to create a shortcode that will query a post based on taxonomies?
- tax_query returning all posts instead of selective posts in WP_Query
- Query custom post type in the loop
- Call custom post type by category
- Filter CPT posts by one or more categories
- Troubles with acf/save_post and WP_Query
- Query custom post type with ACF Date
- WordPress request fiter order by related post’s post_title
- Order Custom Post Type by Custom Field Value
- WP_Query custom post type query not showing the exact post type
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- Change sort order when using ‘orderby’ => ‘type’
- Categories and tags for custom post types
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- How to properly rewrite pagination rules for a CPT to avoid 404 error on /page/2
- $post->post_meta not pulling any post in wordpress/php
- The Difference Between Categories and Tags and Taxonomies and Terms
- How to get the post terms from a child taxonomy
- display posts of custom post type with custom taxonomy
- Custom Post Type posts not showing in category
- foreach loop inside the loop creating duplicates in output
- Sorting by meta_key different to search criteria?
- Shortcode / WP_Query in post changes context
- How to fetch posts that are stored in the different table than (default) wp_posts?
- WP_Query order custom post type with certain meta key value by post modified date
- Cant’ Display Custom Post Type Title Base on Tax Terms
- Custom Post Type ‘Event’: Chronological list of recurring events from meta_values in array
- How to divide Subcategories into pages of parent category wordpress
- Pagination in custom post type archive.php not working
- WP Query: If field X is empty, show posts based on field Y
- Sort custom post column by generated value?
- meta query condition don’t work
- create a “add icon” field in taxonomies page
- How to search through all child taxonomies using WP_Query?
- Custom post type category returns null
- Tell wordpress to show a single page instead of an archive page
- How to get post by meta value
- Use Category for Custom Post Type – But Need Another Separate Archive Page too
- Query Posts From Multiple Post Types
- Problem with menu categories doubling up when updating database?
- Get images only from a certain post type
- querying to custom field over ACF REST API
- Quering array of post types & pagination. Articles are repeating sometimes on different pages