You can get the taxonomies that are registered for a post type with get_object_taxonomies(). If you pass the post object directly, you don’t even need to explicitly name the post type either.
You can then loop through the result of that function to achieve the result you want:
$taxonomies = get_object_taxonomies( $post );
foreach ( $taxonomies as $taxonomy ) {
the_terms( $post->ID, $taxonomy, '<span>', ", ", '</span>' );
}
Related Posts:
- Custom Taxonomy as checkbox or dropdown
- Taxonomy: Why ‘with_front’ => false DOES NOT WORK?
- Custom Taxonomy as Dropdown in admin
- Retrieve single term slug
- How to set individual capabilities on a taxonomy? Or how to re-register an existing taxonomy?
- 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
- Query multiple taxonomy in Custom Post Type
- 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 with specific category structure
- Permalinks for Taxonomy and Custom Post Type
- Custom Post Type and Taxonomy combination
- Exclude specific taxonomy term when using wp_get_post_terms
- Get Post Primary Category
- How to check the terms in single custom post type template
- How can I move a custom taxonomy and its data from one post type to another?
- 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 Taxonomies not appearing in Admin
- How do I do this with WordPress? Taxonomies?
- Can taxonomies of custom post types be used with category actions?
- Limit amount of posts made within a custom taxonomy
- 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
- WordPress Doesn’t Generate Taxonomy Archive
- Adding custom taxonomy in same menu place with two custom post types
- Multiple pages for posts?
- How to organize hierarchical structure in custom post type with taxonomy (like with categories)
- 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
- Custom Taxonomy Category link
- 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?
- How to get all Custom Post Type Filtered by one Specific Taxonomy Term
- Archive-posttype.php isn’t loaded
- How to define a term for custom taxonomy
- List custom taxonomy as navigation – taxonomy pages with all it’s posts?
- Need help deciding on a taxonomy
- Query all post and CPT from 2 specific taxonomies AND by ACF custom field
- Pagination hitting 404 page on /page/4
- Topic won’t save for a custom post type — how to debug?
- WordPress multisite – is it possible to have different taxonomies for each site?
- Get assigned post categories
- Query custom post types & Taxonomies and list them in a table on a page
- Default Category Page not showing custom post type which has taxonomy category
- How to show list of taxonomy terms associated with specific post?
- Creating custom post type posts and associating them with a post from another custom post type
- 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
- Custom taxonomy query showing more than 4 posts
- wp_dropdown_pages with tax_query clause
- Building a Data Intensive Website with WordPress
- Custom post type, taxonomy and admin bar
- How to get post count of specific taxonomy that have store name & category
- Do post types share the same records using the same taxonomy?
- How best to structure multiple CPTs and tax within a ‘resources’ section
- Filter taxonomy by CPT
- Custom permalink structure for custom post types including multiple taxonomy
- How to group custom posts in admin menu based off taxonomy/postmeta
- How to get current post type?
- Taxonomy counter on Taxonomy List(plugin)
- Archive for custom taxonomy
- Get all posts for custom taxonomy term
- Display custom tax in “while” loop
- tax_query not working?
- I can not call the categories of custom post type
- Showing taxonomies with terms that are attached to custom post
- 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
- Custom Post Type used for FAQs Accordion
- category_name not working in WP_Query
- How can I set up the URL for a category archive for a custom 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?