I believe your looking for something like this
<?php
$args = array(
'posts_per_page' => 1,
'post_type' => 'inventory',
'tax_query' => array(
array(
'taxonomy' => 'inventory-category',
'field' => 'slug',
'terms' => array(
'bulk-racks'
)
)
)
);
query_posts( $args ); while ( have_posts() ): the_post();
// do stuff here
?>
<?php endwhile; ?>
Heres how to properly register a post type according to the WordPress Codex page on post types and how to register taxonomies
Related Posts:
- How do I exclude a custom taxonomy from the post loop
- Filtering custom taxonomies
- Using WordPress to make a “Product Search” type navigation drilldown
- Custom Taxonomy not working with posts_per_page in new WP_query (pagination problem)
- get_query_var(‘paged’) always returns empty
- search query within custom taxonomy term, post title and meta field
- Showing posts by collection of specific terms and texonomy
- Problem with query_posts for a custom taxonomy in theme options
- Link to most recently created category of custom taxonomy in primary navigation menu
- Advanced Tax Query
- Sorting Posts Via Custom Taxonomy Values Using Checkboxes?
- Last posts from custom taxonomy
- Taxonomy.php issue with search and filters
- cannot get multiple loops using tax_query
- Alter post order on taxonomy template
- query_posts and custom taxonomy posts order
- quey posts from different categories with taxonomy
- Show all taxonomy’s terms’ posts having another taxonomy’s term in common
- List Posts For Terms Of A Custom Taxonomy For Any Post Type
- Using WP_Query and Query_post for the loop?
- How to write sql query to get the posts from a custom taxonomy term name
- one post per term taxonomy
- Loop through custom taxanomy in post and display custom fields from posts
- Insert taxonomy slug into loop class
- Using Custom Taxonomies to organise products – struggling to call a correct list
- Group posts in a category based on tags in custom taxonomy
- Transfer taxonomy to custom field
- How do I query multiple specific posts from a custom taxonomy?
- Can you orderby slug in a taxonomy archive page using WP_Query?
- query posts returns 10 records
- Getting taxonomies specific to categories
- How much worse is querying custom fields compared to custom taxonomies, quantitatively
- Group custom taxonomies based on tags contained in their posts
- How to show to show post list under the specific category name using jetengine query?
- Using wp_query is it possible to orderby taxonomy?
- How do I query a custom post type with a custom taxonomy?
- “tax_query” parameter not working with WP_Query
- get_posts assigned to a specific custom taxonomy term, and not the term’s children
- How can I get only parent terms?
- How to modify a taxonomy that’s already registered
- Retrieve posts by term id custom query
- Change order of Custom Taxonomy List
- Get the the top-level parent of a custom taxonomy term
- get_the_term_list without links in 3.1
- Inserting terms in an Hierarchical Taxonomy
- get_terms – only top level
- Custom taxonomy terms not showing as list Gutenberg Editor
- Altering the appearance of custom taxonomy inputs
- How to only list the child terms of a taxonomy and not their parents?
- Get term SLUG by term ID
- Is ACF being a honey trap? [closed]
- Get term name from term ID?
- Check if Current Category has Children
- How to use taxonomies on attachments with the new Media Library?
- Hierarchical taxonomy UI
- WordPress taxonomy radio buttons
- How to prevent new terms being added to a custom taxonomy?
- Custom taxonomy, get_the_terms, listing in order of parent > child
- How to remove the tag cloud from custom taxonomy admin page?
- custom taxonomy and pages rewrite slug conflict gives 404
- Inserting a term into a custom taxonomy
- Count posts in custom taxonomy
- How to add images to taxonomies?
- Read-only taxonomy (user can assign term but can’t create or edit existing terms)
- Remove taxonomy base or term from url
- Can you add the visual editor to the description field for custom taxonomies?
- Adding Category/Tag/Taxonomy Support to Images/Media
- Add default WordPress tag meta box to User Profile
- Custom Taxonomy Endpoint Pagination using paginate_links()
- How do I get the top-level terms in a custom taxonomy?
- Check if a post has any term in this custom taxonomy?
- Query Custom Post by Taxonomy Category
- Custom columns on edit-tags.php main page
- Loop through custom taxonomies and display posts
- How do I add a custom taxonomy as an option for menus under “Appearance” > “Menus”
- custom post type taxonomy “tag” archive : no post found
- How to get WooCommerce Product Category Link by ID?
- Order get_terms using a Custom Field
- Add custom taxonomy fields when creating a new taxonomy
- get_term_children for immediate children only (not grandchildren)
- Using pre_get_posts to rewrite search query to display posts from multiple taxonomies
- Custom taxonomies capabilities
- Contact Form 7 – Populate Select List With Taxonomy [closed]
- Can’t get a custom template taxonomy page to display
- Query users by custom taxonomy and user role
- Display category posts grouped by taxonomy
- WP REST API no longer supports filter param, so how do I get posts in a custom taxonomy?
- Custom Taxonomy and Tax_Query
- Custom Taxonomy Archive Page
- How to display custom taxonomies in posts?
- Get taxonomy names by post id
- Include and Exclude Taxonomies From Archives & Feeds Using ‘pre_get_posts’
- How to assign multiple roles for capabilities array withini register_taxonomy function?
- Can custom taxonomies be displayed inside of a custom meta box?
- Determine Term depth
- Exclude Specific Term from Search
- How to get current term in my custom taxonomy in WordPress?
- WordPress database error: [Not unique table/alias: ‘wp_postmeta’]
- Is there a way to ‘Lock’ a Taxonomy?
- Bulk term assignment for attachment taxonomies