WordPress.org

Ready to get started?Download WordPress

Forums

Display posts by multiple categories within custom post type (1 post)

  1. coold78
    Member
    Posted 3 years ago #

    I've created a custom post type (Wine List) and I am displaying a list of items on a page. The list (or posts) are separated into groups by Custom Taxonomies. I want to separate the list down even more using tags.

    Here is a sample code I use for each group:

    <?php query_posts( array(
    					'wine-type' => 'white-wine',
    					'page_per_posts' => -1,
    					'post_type' => 'wine_list',
    					'orderby' => 'ID',
    					'order' => 'ASC'
    					) ); ?>
    
    <?php query_posts( array(
    					'wine-type' => 'champagne',
    					'page_per_posts' => -1,
    					'post_type' => 'wine_list',
    					'orderby' => 'ID',
    					'order' => 'ASC'
    					) ); ?>

    The first displays all posts within White Wine category and the second query displays all post within the Champagne category. The problem I'm having is breaking down the White Wine category into separate groups. Every time I try, each group displays all posts within the White Wine category.

    What is the best way to do this? Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic