This is how I did it. If you have your custom post type as “projects”, and your category as “airplane”.
If you’re not planning on using the pre-build loop you would make another one called loop-projects.php. However, it’s not necessary.
<?php
$args = array(
'numberposts' => 5,
'post_type' => 'projects',
'category_name' => 'airplane');
query_posts( $args );
get_template_part( 'loop', 'projects' );
wp_reset_query();
?>
Related Posts:
- How to Add Custom Taxonomy To Woocommerce Plugin
- How to get the posts of a custom taxonomy term
- How can I rewrite URLs to pass taxonomy and post type values to the query?
- Custom taxonomy not showing up when adding a new custom post type
- query multiple taxonomies
- wp_set_object_terms() is not replacing term, but creating a new one
- Custom Post Type Permalink For Parent/Child, 404 Page Not Found Error
- Create an archive page for custom taxonomies
- remove support for ‘Categories’ for a custom post type
- How to check if last uri segment is a custom post type or taxonomy term?
- Categories under custom post types doesn’t show properly
- Hide child term posts on parent term pages
- How to select one major category (or custom taxonomy) for a custom post type?
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- get a list of posts from Custom Taxonomy
- Want to filter only parent post in admin area
- Custom Meta Boxes – Nonce Issue – Move to trash issue
- Child and grandchild taxonomy listings – 404
- Trying to manage templates on a blog with lots of custom taxonomies
- Display custom taxonomy as dropdown list
- Automatically Add a Category to a Custom Post Type
- Custom Permalink Tag breaks Pagination
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Query to change custom post type with specific category
- Custom post type and taxonomy permalinks – Structure
- Best action hook to create custom post and assign taxonomy terms to it on plugin activation?
- Custom Post Type and Custom Taxonomy Permalinks
- How many Custom Post Types to register?
- Insert HTML inside link in a walker
- How do I get array of types associated with a taxonomy?
- Root slug of taxonomy returning 404
- wp_get_post_terms on custom post type with custom taxonomies returning an empty array
- Pagination for Custom Taxonomy Page [duplicate]
- get_category_parents for custom post type taxonomy
- Custom loop with multiple taxonomy queries
- Hide post navigation if current post is in a category with only one post
- Setting up taxonomy to relate various custom post types – advice on structuring?
- I want to change the word “Tags” in WordPress to something else, but how?
- What is the best practice for displaying my plugin content in themes?
- Set post terms for multiple posts
- Get terms that contain posts that in turn belong to other terms?
- Archive for a Taxonomy of a Custom Post type
- Pagination Not Working for Custom Taxonomy with Custom Query – 404 Error
- Custom Taxonomy Is Being Pulled into a Page, But It Doesn’t Have A Hyperlink
- Querying two taxonomies with tax_query not woking
- Shared terms between taxonomies
- custom hierarchical taxonomy and custom post type list contains surplus posts
- Custom sidebar for custom post type
- Show category and tag link as a submenu under custom post type submenu
- Urls in Custom Post Type work for Terms but not for its Taxonomies
- Add filter to Admin list for all custom post types by their custom taxonomies
- Single.php for Custom Post Type > Taxonomy > Term
- Add the custom post term to the custom post title
- Display 3 recent posts from one taxonomy
- Display next 3 posts based on custom taxonomy
- Displaying custom taxonomy menu in custom post type archive
- Custom post types templates
- prevent sub categories to show up
- Display latest post of taxonomy
- Custom post type category link redirecting to 404 page
- Custom post type and multi taxonomies + customize url
- Archive page URL for custom taxonomy and post type
- Custom Post Type Archive Page showing as 404
- Custom taxonomy terms hierarchical navigation
- Is it possible to add the Gutenberg block editor to a custom taxonomy?
- What is the best way to structure posts for the same event happening in different years?
- WordPress Custom Taxonomy – If not parent term
- Dynamically Adding Posts of Post Type to A List
- Multiple Custom Post Type in Taxonomy Archive Causing White Screen
- Adding a Section for Visitors
- Why is my loop not populating the page with my custom taxonomy terms from my custom post type?
- Show parent category and subcategory once in while loop
- I cannot display custom posts in custom taxonomy
- How to change URL structure for custom post type in wordpress? Custom taxonomy + custom Post name [duplicate]
- Custom taxonomy with custom post type template not showing
- Loop to display parent categories in custom taxonomy
- One-Time Script TimeOut for Large Data
- CPT Efficient way to display posts from different categories with custom query
- Associate custom categories to different user IDs
- How to create default taxonomy term for a custom post type? [duplicate]
- Extensive search filtering and results->PDF in the front-end
- redirect old post type url to new structure url
- archive-{custom_post_type}.php not getting recognized wordpress
- How to retrieve the permalink for a specific (custom) term?
- Values inside a custom field to determine which category posts to display
- Pagination for a Custom Taxonomy
- Trying to create hierarchy between 3-4 custom post types
- title tag for custom post type remove taxonomy name from title tag
- Display and Allow users to edit their own profiles
- Create a page selector using taxonomies
- Advanced search form with filters for custom taxonomies and custom fields
- Building a List of Posts grouped by custom taxonomy as the section header only to be displayed if at least one post is in that tax
- Only One Post of Custom Post Type Appearing on Template Page
- Code to show related posts (custom post type and custom taxonomy/category) is messing with other code
- register_term_meta not working
- Custom taxonomy meta fields
- Same slug for Custom Taxonomy archive and CPT archive – Rewrite rule not working
- How to add categories to a custom post type using wp_insert_post($new_post);
- Modify permalink of CPT archive to support two taxonomies
- WP Query – Can’t get posts with specific taxonomy