See the inline comments. Not tested. The following code will grab all the Custom Taxonomy Terms of Custom Taxonomy ‘product-cat’ and will show them one by one from the result array.
<?php
global $post;
$postID = $post->ID //get/put your post ID here
$getProductCat = get_the_terms( $postID, 'product-cat' ); //as it's returning an array
foreach ( $getProductCat as $productInfo ) {
echo $productInfo->name;
}
Related Posts:
- get_the_term_list without links in 3.1
- Custom columns on edit-tags.php main page
- get_term_children for immediate children only (not grandchildren)
- Creating a non-removable taxonomy term
- Is it possible to use one slug for Multiple Taxonomies?
- Is it possible to add taxonomies to user profiles?
- Get terms from multiple taxonomies
- Using tax_query creates a 1 = 0 or 1 = 1 in $wp_query->request
- How can I set a default listing order on the admin page for a custom taxonomy? (without plugins)
- Is it possible to sort the post based on a custom field?
- How do I get terms as a list for a specific post?
- get taxonomy terms for parent and child
- On Taxonomy Template page, want to add Post_Type
- Separator for multiple terms
- The next_posts_link() show me a aditional page in blank
- Help building array hierarchically with taxonomies (to get posts)
- Ordering Posts with Custom Taxonomy Terms Array
- Taxonomy based permalinks
- How to create a theme template for the taxonomy “root”
- Taxonomy , subtaxonomy,child taxonomy of a product woocommerce
- wp_query to display custom taxonomy terms
- Custom Taxonomy list: how to make “choose from most used” default to open, checklist
- How to register child taxonomies?
- get_terms in a taxonomy template
- Custom Taxonomy template is not recognised
- WP REST API – Limit the taxonomy search to the first letter
- How to filter terms from a custom taxonomy by a usermeta value on all screens and templates
- How to adjust code to refresh a dropdown box with tags that are active on filtered category listing
- How do I display a list of posts under all hierarchical children of the current taxonomy?
- Use get_the_terms to list subcategories of custom taxonomy
- List child terms if parent but show nothing on children
- Locale switching with a “language” taxonomy
- query_posts and custom taxonomy posts order
- Modify “View” in admin panel for custom taxonomy
- User: Editor, can’t see edit taxonomy screen
- How to get my post title to work with an apostrophe (‘s)?
- How do I exclude posts from custom taxonomy from a custom post type archive?
- Hide product categories and taxonomy terms in menu if empty
- Using custom taxonomy to tag posts for inclusion in slider
- Custom taxonomy forms for user profile
- Is it possible to store Json data in post_meta and manipulate
- How to create a dependent drop-down and options in dropdown must be manageable from admin panel
- Filtering posts by an already registered taxonomy
- Search Tool only refreshes Page without showing results
- Add Taxonomy Subcategory To Permalink
- Updating / Saving items generated by wp_terms_checklist on frontend
- Term and sub term from custom post type query [closed]
- Customizing Primary Menu to include custom taxonomy description
- Rewrites with hierarchical taxonomies in permalink
- Rewrite rules for varying nested terms of custom taxonomy
- Custom Taxonomy with tax_query
- Update table wp_term_taxonomy.count after INSERT INTO via SQL
- Get posts in certain Taxonomy terms for the current page url
- Exclude taxonomy term from all loops, but having it on widget
- Get all attachments by custom taxonomy – term
- Get terms that don’t belong to current post with a shortcode
- saving meta/custom field to tag
- How to get posts that contain multiple terms from multiple taxonomies?
- Cannot delete or edit a single term in a custom taxonomy, taxonomy name is wrong?
- View the complete list of a taxonomy in the navigation menu
- Correctly order the hierarchy of custom taxonomy when displaying terms
- Changing input type from text to multi select dropdown – skill taxonomy
- How best to store data (URLs and IDs) extracted from posts and pages using custom taxonomies
- What’s the best way to add taxonomy’s image in 2017?
- Archive page for custom taxonomy grouped by month
- Add custom taxonomy as a css class
- Wp_query…a type of term a different div
- Taxonomy page shows category in title
- Replace taxonomy term with an image in a custom loop
- Need to display custom taxonomy on single page – not working
- Show single Child Category on Custom Post
- Only display latest custom taxonomy post
- Need equivalent of single_term_slug
- unable to save custom taxonomy terms in a custom-built metabox in wp-admin
- How to group non-hierarchical tags?
- Multiple Drop-Down custom taxonomies search
- How to combine taxonomies into URL?
- Issue adding custom taxonomies to custom post type (PHP)
- Taxonomy URL rewrite whilst keeping filtered posts?
- Add terms to a taxonomy archive from within the same taxonomy
- Fill New Taxonomies
- How do I show the parent term on a custom taxonomy template (not the ID)?
- Display taxonomies for custom post type
- Custom Taxonomy – Dropdown
- How to show selected check box vendors on front end home page?
- Error 404 in Custom taxonomy with pagination
- Need help understanding a rewrite with multi-level taxonomy
- custom taxonomy don’t return a value
- Where to put a migration script to switch post information?
- Gravity prerender taxonomy [closed]
- Advanced search: roles and multiple taxonomies
- One taxonomy template for all categories?
- Get post terms with hierarchical relationships
- Removing fields from category/taxonomy edit form
- Error in Custom Taxonomy UI
- Remove ‘portfolio’ from URL
- is_tax not working for custom taxonomy
- Custom taxonomy with custom meta value is not sorting correctly (query returns the same value for orderby regardless of sort column click)
- wp_add_object_terms cant recognize a post ID
- Foreach for get_the_terms for hierarchical taxonomy don’t repeat Top Level Terms if contains multiple Second Level Terms