Specify this when you make your query:
'genre' => 'comedy'
Where genre
is the name of your taxonomy ( not the human readable version, but the internal slug ), and comedy
is the slug of the term you want to filter by
Importantly, indent your query parameters, and put them each on their own line so that it’s easy to read/type/change, a good editor will do this for you. You also need to do an if( $loop->have_posts() )
to check that you got posts and handle things if none were found, and a wp_reset_postdata
call to clean up at the end ( otherwise any calls you make will show the last movie in the loop, rather than the current post/page )
You can use the tax_query
parameter for more complex queries, the details are in the codex under the WP_Query
documentation