To return the list of terms attached to that post, try get_the_term_list()
. This will return the terms for a single post and by using the before, separator and after arguments you can easily build an HTML markup structure to suit your needs.
The following example creates an unordered list of terms from the Topics taxonomy attached to a specific post:
<?php
$terms = get_the_term_list( $post->ID, 'topics', '<ul><li>', '</li><li>', '</li></ul>' );
if ( $terms ): ?>
<h2><?php esc_html_e( 'Topics:', 'yourtextdomain' ); ?></h2>
<?php echo wp_kses_post( $terms, 'yourtextdomain' );
endif;
WP Codex entry for tget_the_term_list()
:
https://codex.wordpress.org/Function_Reference/get_the_term_list
Related Posts:
- Get Posts by Custom Post Type ,Taxonomy, and Term
- How to limit the number of terms (terms acts like categories)
- How do I list custom taxonomy terms without the links?
- wp_insert_term doesn’t work with custom post type’s taxonomy
- Retrieve single term slug
- Get list of terms of current taxonomy archive for another taxonomy
- Get all taxonomies for all post types
- How to check the terms in single custom post type template
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- How do I display the taxonomy for a custom post type in an array
- Custom Taxonomy Terms in Menu lead to which page?
- How to order taxonomy terms by most recent post?
- Get all posts for custom taxonomy term
- Pages of my taxonomy terms are showing all posts
- Filter Term By Parent Term – Custom Post Type
- Filter By Term Not Working – Custom Post Type
- WordPress add taxonomies/terms list as a menu in archive page
- get_the_term_list() wanting to loop through the returned values
- List custom taxonomy terms
- Issue On Listing Woocommerce Parent Tag List
- Taxonomy Archive URL + Template
- Custom Taxonomy as checkbox or dropdown
- Taxonomy: Why ‘with_front’ => false DOES NOT WORK?
- Custom Taxonomy as Dropdown in admin
- Custom Taxonomies Terms as Post Title for Custom Post Types upon Publishing
- How can I add programmatically custom taxonomy terms to a custom type post when saving posts?
- post count is wrong when using same taxonomy for 2 different CPT
- Glossary with Custom Post Type
- Query multiple taxonomy in Custom Post Type
- Separate Custom Post Type Taxonomy by Comma
- Get child terms of current term of the current post
- Custom Post Type: How to display all of same taxonomy?
- Remove “-2” from a Toolset Types URL with the same post name
- List all custom post type posts from a given category?
- Use the_taxonomies() to create a simple list
- Listing taxonomies from custom post type
- Custom Post Type and Taxonomy combination
- Output the content of a term organised by each of the CPT?
- How can I move a custom taxonomy and its data from one post type to another?
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- How do I display tags for a custom post type single page?
- Custom Taxonomies not appearing in Admin
- using $wpdb to get custom post type with term
- Allow user to set custom order to a list of custom taxonomies?
- Which post does a taxonomy term belongs to?
- Limit amount of posts made within a custom taxonomy
- list taxonomies from a custom post type
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- Full Custom Post Type List Organised by two Taxonomies
- WordPress Doesn’t Generate Taxonomy Archive
- How do I require the specification of term in a custom post type and custom taxonomy?
- Rename a slug label
- Custom taxonomy (categories) on custom post type return no results
- How to Display Posts From Category Within a Custom Taxonomy?
- Rewrite custom post type with taxonomy
- WordPress multisite – is it possible to have different taxonomies for each site?
- My custom taxonomy is only displaying 1 of 3 terms
- how to count the current posts terms
- How to show list of taxonomy terms associated with specific post?
- 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
- Getting List of child terms from custom taxonomy parent
- How can I get 3 different taxonomy type terms in a div class element?
- Custom taxonomy query showing more than 4 posts
- Get terms for a specfic post from multiple taxonomies in custom post type
- Custom Post Type Taxonomy Term Order by Title
- Using page title as a link to term archive
- Add custom post type taxonomy tag to article class
- Custom Taxonomy dont save in a frontend form for post a custom post
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- 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
- Get the taxonomy value in the post loop inside the archive page
- How to show related posts of category on post within custom posttype
- display post count in archive page that have relation with another taxonomy term
- get taxonomies from terms
- Excluded Custom Taxonomy Term Posts Displaying in loop
- WP_Query for custom taxonomies showing posts from non-specified terms?
- posts_per_page is not working by term
- Listing all custom posts having a specific taxonomy whatever the terms
- Display custom tax in “while” loop
- tax_query not working?
- Add active class to foundation 6 tabs while looping categories
- Showing taxonomies with terms that are attached to custom post
- Saving Child Terms on front end not setting parent
- Custom Taxonomy page redirecting to 404 page
- Connect 8 Taxonomies to One (Main) taxonomy. How to?
- Get posts of an specific term of a custom taxonomy
- Custom Taxonomy is disabled on Edit page
- Override “Parent” input for custom taxonomy
- Fetch posts list from fist CPT taxonomy term and list under 2. CPT
- How to List CPTs Under One Tax Term
- Get a list of categories ids
- Check if taxonomy is attached to at least one post in a post-type
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Looping taxonomy in taxonomy?
- Custom posts and custom taxonomies for many products and categories?
- How do i get the taxonomy term name on the CPT archive page?
- Get term link of shared taxonomy between multiple post types