Review site custom post type structure

I build a review site with WordPress. I created a custom post type called “Reviews”, inside this, theres two taxonomy, one called “Genres” and one called “Types”. Inside the Genres, i have a couple of subcategory, action, comedy, drama etc… and inside the Types, i have 2 subcategory: Movies and TV Shows

I want to create a navigation on my homepage like this:

Read More
  • Movies
    • Action
    • Comedy
    • Drama
  • Tv Show
    • Action
    • Comedy
    • Drama

And of course, if i click on the Tv Shows/Action, i only want to display all of the reviews inside the Tv Shows category which has an Action genre, and only the TV show, not the movies.

What is the easiest solution to do this?

Related posts

Leave a Reply

1 comment

  1. The way that I would approach it is using the tax_query to create a query that looks for both the correct genre and type. For example, to query all Movies that are Drama:

    $myquery['tax_query'] = array(
        array(
            'taxonomy' => 'genre',
            'terms' => array('drama'),
            'field' => 'slug',
        ),
        array(
            'taxonomy' => 'type',
            'terms' => array('movie'),
            'field' => 'slug',
        ),
    );
    query_posts($myquery);
    

    Hopefully that will get you started in the right direction.