There are several ways to achieve this.
Using get_the_terms:
$args = array( 'post_type' => 'movies', 'posts_per_page' => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php
the_title();
$terms = get_the_terms( get_the_ID(), 'genre' );
if ( is_array( $terms ) ) {
//Manipulate array of WP_Term objects
}
?>
<div class="entry-content">
<?php the_content(); ?>
</div>
<?php endwhile; ?>
using get_the_term_list:
$args = array( 'post_type' => 'movies', 'posts_per_page' => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php
the_title();
echo get_the_term_list( get_the_ID(), 'genre' );
?>
<div class="entry-content">
<?php the_content(); ?>
</div>
<?php endwhile; ?>
Related Posts:
- need advice on how to do a lists using custom post types – taxonomy vs postmeta
- Error 404 change permalink term custom term taxonomy
- I have a random letter appearing before my content. Where to start looking for the cause?
- Where to put my code: plugin or functions.php?
- Custom post type single-{custom}.php not working
- How to Add Custom Taxonomy To Woocommerce Plugin
- Mini-Site Strategy
- How to completely disable a taxonomy archive on the frontend?
- How to build a complex page structure
- How to set a fall back template for a custom post type in a plugin?
- register_taxonomy with multiple object type and update_count_callback
- Where to put archive-{post-type}.php
- Custom Taxonomy and tax_query Issue?
- How to Build a Movie Library in WordPress 3.x
- How to List Thumbnails based on Custom Categories
- Limit users by custom taxonomy and user roles
- Generate Shortcodes by Taxonomy
- Custom Taxonomy Not Showing in Menu
- Set object terms not working on plugin activation
- Displaying a custom post types custom taxonomy value?
- get_object_taxonomies() returns empty array for custom post type
- What template files do I need to customise custom-category-term-links rather than fall back on archive.php?
- Adding a custom post type taxonomy template in plugin
- How to add a custom taxonomy to show up in a custom post type menu?
- Help need making decision. Ads rotating site on wordpress
- custom taxonamy and post type
- Return the latest post from a custom Taxonomy and Post Type
- Don’t know how to show custom taxonomies from a custom post_type
- Display a grid of taxonomy terms at root taxonomy page
- Get unique superset of taxonomy terms from a list of custom posts in another hierarchical taxonomy
- What is the best practice for displaying my plugin content in themes?
- How to have this permalink structure: post_type/postname/custom_inner_page
- Deleting taxonomy terms and relationships on a custom post_type when a user is deleted
- Plugin fatal error
- custom comments form for custom post type
- How to produce a sub-page-system in WordPress
- Custom post type’s extra fields – how to handle?
- Main query not querying any posts in custom taxonomy template
- detect your custom post type in WordPress
- How to add and clear custom post types and taxonomies in a plugin? Considerations for existing data
- Dynamically insert code to custom post type loop
- Show current custom taxonomy
- how to get this tax_query working?
- Show Taxonomies with admin area for custom post type?
- Include custom post type custom taxonomies in Categories widget
- How to Use Custom Meta Field Instead of CPT Title in Post URL
- How to List Custom Post Type Titles Based on Theirs Taxonomy Terms Inside a Nested Loop
- Most viewed post of custom post type
- Writing a custom Glossary plugin
- How can I tell if I’m on a custom post type archive page?
- Custom post type page with parameter
- Not Able to Add New Class To CPT Attachment Image
- Custom post type category link redirecting to 404 page
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- Custom post category name showing empty
- How to store the third party script with HTML code in the wordpress custom input field?
- Getting Same Description in All the Custom Taxonomy Posts
- Get next and prev item from custom WP_Query and Custom Post Type
- How to show Custom Post Types under Taxonomy in a new WordPress page template?
- Why are custom taxonomies only appearing on the edit page of one of these types, but not the other?
- Custom post type 404 category page
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Changing CPT permalink
- How to search through all child taxonomies using WP_Query?
- Custom Post Taxonomy Template Not Loading Properly
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- How to display only child category post in related posts in custom post type?
- Having issue on Loading Meta Data From CSV to CPT
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- Insert custom taxonomy into category query
- % encoded URL giving 404 error in WordPress
- Which File Populating CPTs in Slug URL
- Front End users account with lots of user Roles (not Woocommerce)
- Custom post type that lets users create a set of posts?
- call a function when insert and update a custom post type
- Not Able to List CPT Based on Taxonomy Term
- Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?
- Facing some Issues on Two Parts Custom Post Type Taxonomy Names
- Help with Multi Level Category Archive Page
- Not Able to Get Custom Post Type in Single and Single-custom-post-type
- How to develop custom URL redirection
- Custom post type with custom taxonomy permalinks
- Custom taxonomy page template
- Associate custom categories to different user IDs
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- show custom taxonomies in hierarchy
- Render custom taxonomy query as single template
- Issue on Counting CPT’s Under Taxonomy Term
- Not Able to Display Metabox Saved Checkbox and Selected option After Save/ Update
- Custom Taxonomy Showing in WP Menu
- Get term_id for each instance of custom taxonomy
- How to internationalize the sub menu name “categories” in Custom post type?
- Issue on Adding Taxonomy to Custom Post Type Using Function
- How to Create Custom Post Type with Multiple Color Options?
- Custom post type and custom taxonomy archive inaccessible
- Apply custom names for generic custom taxonomy name?
- Need some hints for my own WP theme development
- Custom Post Type urls not working
- How to filter custom post data with AJAX?
- Make term slugs of custom taxonomy available in WP REST API for custom post type?