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
Related Posts:
- Taxonomy: Why ‘with_front’ => false DOES NOT WORK?
- Retrieve single term slug
- How to sort list of custom posts to get view like a tree of posts under categories and their children’s categories?
- List taxonomies with thumbnails
- Custom Post type taxonomy single templates
- Use the_taxonomies() to create a simple list
- Listing taxonomies from custom post type
- Permalinks for Taxonomy and Custom Post Type
- Hierarchical Custom Post Types – Show only parent on tax archive?
- Pagination is not working on single-{slug}.php but works fine on page-{slug}.php
- Change or update WordPress loop based on dropdown selection
- Custom Post Type Set Comments ON by default without show METABOX
- How do I do this with WordPress? Taxonomies?
- Limit amount of posts made within a custom taxonomy
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- list taxonomies from a custom post type
- Set a CPT slug as a base name for all the taxonomies
- Taxonomies relations
- Full Custom Post Type List Organised by two Taxonomies
- Adding custom taxonomy in same menu place with two custom post types
- Multiple pages for posts?
- Organize WordPress site, so it can maintain with huge database
- Review site custom post type structure
- Different Category system needed for the Custom Post Type
- Categories and tags for custom post types
- Rename a slug label
- Get Post Terms of Current Post (selected taxonomy term) – How to get only the taxonomy value and not “Array ( [0] => taxonomy term )” in the frontend?
- Custom taxonomy (categories) on custom post type return no results
- Add tags to custom post type without menu link
- Need help deciding on a taxonomy
- Query all post and CPT from 2 specific taxonomies AND by ACF custom field
- Get Posts by Category, Tag , and CPT Taxonomy
- Pagination hitting 404 page on /page/4
- Rewrite custom post type with taxonomy
- Topic won’t save for a custom post type — how to debug?
- WordPress multisite – is it possible to have different taxonomies for each site?
- My custom taxonomy is only displaying 1 of 3 terms
- How to show list of taxonomy terms associated with specific post?
- Sort results without WP_QUERY?
- I have custom post type with custom taxonomy. But not found the taxonomy page..
- Group Custom post type in a taxonomy page by its child taxomony
- Categories won’t appear on custom post type
- Getting List of child terms from custom taxonomy parent
- Custom taxonomy query showing more than 4 posts
- Custom Post Type Taxonomy Term Order by Title
- Using page title as a link to term archive
- Custom Post Types – Taxonomy and Customization
- wp_dropdown_pages with tax_query clause
- Building a Data Intensive Website with WordPress
- Custom post type, taxonomy and admin bar
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- Displaying taxonomies as category links within sidebar and creating pages for these
- How to get post count of specific taxonomy that have store name & category
- Get List of Terms based on a given term (different taxonomy)
- Duplicate slug/permalink issue while adding same post name
- Question about link two types of data in wordpress
- Add Tags to a Custom Post Type from a FrontEnd Form
- Do post types share the same records using the same taxonomy?
- Get the taxonomy value in the post loop inside the archive page
- How best to structure multiple CPTs and tax within a ‘resources’ section
- Custom post type archive URLs with a single taxonomy
- Custom post type archive page filters
- wp_set_object_terms creates taxonomies but does not add custom posts to it
- get taxonomies from terms
- WP_Query for custom taxonomies showing posts from non-specified terms?
- Taxonomy counter on Taxonomy List(plugin)
- Archive for custom taxonomy
- Get all posts for custom taxonomy term
- Listing all custom posts having a specific taxonomy whatever the terms
- Convert attribute woocommerce terms (taxonomy terms) in posts of custom post type
- Display custom tax in “while” loop
- tax_query not working?
- Taxonomy template file not working with a taxonomy that contains a slash
- I can not call the categories of custom post type
- Showing taxonomies with terms that are attached to custom post
- Custom Taxonomy page redirecting to 404 page
- Multiple Custom Post Type with different Taxonomies
- Connect 8 Taxonomies to One (Main) taxonomy. How to?
- Filter By Term Not Working – Custom Post Type
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Custom post type taxonomy template and URL confusion
- Custom Taxonomy is disabled on Edit page
- Override “Parent” input for custom taxonomy
- Simple term-archive-linked Taxonomy Entry output
- Custom Post Type Categories Not Maintaining URL structure any more
- Best way to structure article and issue relationship for CPT
- category_name not working in WP_Query
- How can I set up the URL for a category archive for a custom post type?
- Check if taxonomy is attached to at least one post in a post-type
- How to make an admin create/edit post page to look like taxonomy page?
- Looping taxonomy in taxonomy?
- Custom posts and custom taxonomies for many products and categories?
- List custom taxonomy terms
- How do i get the taxonomy term name on the CPT archive page?
- Query multiple post of which one by taxonomy
- Is there a function that replace category name with a icon?
- Taxonomy listing issue – does not display how I would like
- Show custom category archive as front page and remove taxonomy slug from urls
- Passing total post count to javascript
- How to determ a custom post type url?