How to display posts from a single category within a custom taxonomy

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

Leave a Comment