You can use get_the_terms to retrieve the terms of a specific taxonomy of each post. You can use this inside the loop:
$terms = get_the_terms( get_the_ID(), 'promo' );
foreach ( $terms as $term ) {
echo $term->name;
}
get_the_terms returns an array of terms and each term has the following properties:
WP_Term Object
(
[term_id] =>
[name] =>
[slug] =>
[term_group] =>
[term_taxonomy_id] =>
[taxonomy] =>
How to show the current category of an article with CPT UI =>
[parent] =>
[count] =>
[filter] =>
)
Related Posts:
- Counting the number of posts (custom post type) Query problems
- What are the differences between custom post type and custom page templates?
- Why won’t my metabox data save?
- Defining capabilities for custom post type
- Now can I group custom post types together?
- Templates for Custom Post Types and Custom Taxonomies
- Does anyone have any frameworks to setup custom post types and related actions/filters?
- How to solve suspected memory issue in custom WordPress loop?
- Query multiple taxonomy in Custom Post Type
- Remove “-2” from a Toolset Types URL with the same post name
- Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar
- register_post_type – rewrite / feeds, what’s it for?
- Get permalink and title by post name?
- Ordering Custom Post Types with WP_Query
- Why are navigation items saved in the database?
- Filter posts with meta_query NOT IN where value has multiple values
- Custom Post type with ACF in REST API, how do I get those values?
- How to show the archive / post type description on Single templates
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- Posts from all the categories are being displayed instead of particular category
- Custom Post Types, URL rewrite on multiple CPTs
- Can’t edit custom post type
- redirecting improperly after updating custom taxonomy term when referring from CPT edit page
- Deleting Custom Posts & Meta Data on Uninstall
- I’d like to cycle through existing posts in a post type, showing one per day ordered by title, and starting over when the last is reached
- Why is my site using index.php instead of archive?
- WooCommerce Customer Role Delete Custom Post Type
- Options page – dropdown of users
- Addition of custom option panel crashes Media Library & Admin Area
- Custom Post Type – Duplicate Page Slugs
- how to show a category from a CPT?
- Refine custom posts by author
- Custom post type pagination 404
- Meta Data for Custom Post Type not saving
- Remove “show sharing buttons” metabox Jetpack from custom post type
- Serial Number Delivery System Using WordPress
- Custom post type causes php-error in php version 5.2.17
- How do you make a custom post type items automatically delete items 3 months after publication?
- WP Query ‘posts_per_page’
- Associate page w/ specific single post template?
- Custom Post Type Metadata Not Saving
- Custom Meta Box Causing Error: “Are you sure you want to do this? Please try again.”
- Displaying custom post types as a gallery
- Which escaping function should be use on register_post_type label?
- Iterating through Object Array to customise display of full custom taxonomy for custom post type
- When I choose category from dropdown then everything working fine.But in backend it checked only child not parent [closed]
- Keep getting logged out
- custom post type by author – wp job manager
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Change Custom Post Type singular_name through function/filter
- Custom Post type showing up in loop, regular posts are not showing up
- Best way for a plugin to define a custom post type archive template?
- WordPress custom post type numeric pagination with ajax
- How to make an API call to a custom post type but filtering by meta value?
- Custom Form / Search with Custom Post Type Data
- Settings -> Reading -> Posts Page ->Blog — is not working in my website
- Does non-content posts have a negative impact on SEO?
- Sudden 404 pages on product category archives
- Some posts not displaying by taxonomy term
- Update post status from “publish” to “trash” prior to year 2018
- Simple way to hide\show an announcement (just a div) on homepage?
- Create Custom page with custom domain
- Archive for custom taxonomy
- How can we display full post on home page rather than excerpt
- WooCommerce change
- Custom post types & Advanced Custom Fields code is not working
- Working with Custom Post Type
- Question on templates
- What is WordPress’ custom post type ‘Logs’?
- Custom taxanomy and custom post type – pagination leads to 404
- How can I load Template file from wordpress plugin
- Getting all custom post taxonomies and exhibiting only part of them
- Custom post url in search.php isn’t the correct rewrited url
- Author archive custom posts only?
- update a posts of other custom post type
- How to return custom posts in loop?
- Custom post type AND custom taxonomy are not connected
- How to delete comma from the end of results? [closed]
- Converting a checkbox filter for custom fields to a dropdown
- How can i call a custom method on submission of a custom plugin post type?
- Front end page submission form does not attach custom post type
- Pagination custom post types outside loop
- How do I get a nested query to only display content that the main query outputed
- Custom post type page for authors
- Get post id of permalink for a specific custom post type?
- Custom template support for custom post type?
- Using one custom taxonomy.php for two custom taxonomies?
- If you’re calling a dynamic css inline style does that div have to be in the loop?
- If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?
- Add taxonomy to custom post type archive
- posting twice from an array?
- Custom post type – permalink
- How to show animal lineage/pedigree in WordPress?
- Order custom post type is beign ignored
- How do i get the taxonomy term name on the CPT archive page?
- is this a bug or not?
- How do I target a links only in a custom post type and only in the p tag?
- How to add to taxonomies to a post type
- Custom plugin contact form connecting to mailchimp API
- Update Custom Field daily within 7days