I have found an hopefully elegant solution
$taxonomy_names = get_object_taxonomies( $post, 'objects' );
foreach ($taxonomy_names as $tax) {
if ($tax->query_var != 'tag') {
// needed because $taxonomy names containes more than one query_var
$current_tax_name_slug = $tax->query_var;
}
}
This one works for me
Related Posts:
- How do I get the top-level terms in a custom taxonomy?
- Get only the first term by taxonomy
- Is it possible to get a Previous/Next Taxonomy term archive URL?
- Which template name to use for taxonomies but not their terms?
- Count number of post in Taxonomy?
- How to include parent terms in hierarchical taxonomy URLs?
- Manipulating cookie on specific taxonomy archive page
- How to edit/remove a term that’s in multiple taxonomies?
- Fix : Custom Taxonomy Duplicating in each call
- Create Admin Only Taxonomies?
- Category page and edit post page with this category very slow
- Text and image in taxonomy page
- Custom taxonomies
- Custom Taxonomy tree view not showing correctly in backend
- Add parent/child taxonomy to custom post type url
- How to add custom field to custom taxonomy in 4.4
- Extending wordpress search to include excerpts and taxonomies?
- Adding ‘active’ class to custom taxonomies using walker in functions.php
- How to output content based on same custom taxonomy?
- How to create custom taxonomy URLs without taxonomy name?
- How to add taxonomy to Users menu in admin?
- Category page for custom-taxonomy shows 404 when using custom permalink structure
- How to insert an array of terms using wp_insert_term?
- Create Advanced search with taxonomies (not filter list)
- Show nav link highlighted
- display taxonomy slug from term ID
- How can i retrieve all custom registered taxonomy?
- How to Put Custom Taxanomy Meta Box in Main Column
- Hook to change Custom Tag Taxonomy Links?
- Redirect all child taxonomy to its parent
- How to add taxonomy to user?
- How to use get_the_terms() to display multiple terms?
- Woocommerce product search result layout page
- Sorting Tags by Slug Value
- List posts of term on term’s admin edit page
- Search functionality in ‘taxonomy postbox’ on edit post page
- Taxonomy Order by Name
- Change the permalink URL to include a taxonomy term
- How to limit the number of users who can be added to a user custom taxonomy?
- Get Custom Taxonomy Title by Spesific Sub Category via fputcsv
- Taxonomy Pagination Rewrite
- taxonomy tax-name archive
- Set Custom Taxonomy to Entire Site Programatically
- Hiding taxonomies with no children WP_Query & tax_query
- Custom taxonomy for Media Library
- Same term from custom taxonomy in two different custom post types?
- How to fetch the data from Advanced Custom post when we search specific keyword or field name related to the post?
- 2 custom post-type and 1 taxonomy
- Order get_terms() by hierarchy
- Proper way to update the slug of a taxonomy using register_taxonomy? [duplicate]
- Forcing a term/taxonomy on all posts of CPT
- Displaying Custom Taxonomy without a hyperlink
- Is it safe to register a taxonomy without using any hooks?
- How to support fifteen thousand terms in WordPress?
- Display a specific hierarchical level of a specific custom taxonomy
- Display Custom Taxonomy names
- Different Taxonomy Values for Each Post
- Dynamically set taxonomy term and show admin notice on post save
- Remove taxonomy widget from “PAGE” post
- WP 4.8 : new taxonomy syntax for get_term_by and get_term_link ?
- Custom taxonomies not showing up in admin menu
- How do I hide certain taxonomy boxes from users in admin add post page?
- Get list of taxonomies associated with users
- how to use tax_query to apply both terms or one if one is empty
- Get current page term title to use in WP_Query
- Show related posts on single.php, grouped by taxonomy terms, with Advanced Custom Field post object selected
- making an index from custom taxonomies and tags of posts (not hierarchical taxonomy)
- Displaying my custom taxonomies in a using the_term_list()
- Using Custom Taxonomies to organise products – struggling to call a correct list
- Use wp_list_categories to list parent categories from actual term
- Singular custom taxonomy label
- is there a way of getting term children that only shows those from two taxonomies
- Get Posts Related to Category By category id or slug
- How to add a dynamic dropdown derived from custom taxonomy
- Tree view wp-admin terms
- Order get_terms by count using a custom taxonomy hierarchy
- How to add chained dropdown filter to a wordpress website
- How to create a non removable taxonomy term?
- How to show category list in WordPress
- custom taxonomy not showing up after adding capabilities upon updating to WP 5.1.1
- transfer two existing taxonomy terms into one custom metabox
- How to add all existing Custom Taxonomy to Admin Menu Creations Interface?
- Change the Page Title of the Archive Page for Portfolio Tags
- Is it possible to sort the post based on a custom field?
- Catchable fatal error: Object of class WP_Error
- Permalink structure not working with Custom Taxonomy (URL like ./taxonomy/category/postname)
- Creating a Taxonomy Page [duplicate]
- WordPress shortcode Issue!
- Switching from catalog to product category/subcategory
- Extra fields on categories that is available via the WP-API?
- Tax Query not working
- Taxonomy archive page have no post
- Display list of custom taxonomies from a custom post type ordered by their parent
- What’s the proper WordPress URL for the template of my custom taxonomy?
- WordPress show posts from children terms of a taxonomy term
- how to import custom taxonomy (& terms)
- How to create a page that lists custom taxonomies with links?
- Getting taxonomies specific to categories
- How to add/enqueue Custom CSS for a custom taxonomy page?
- Gravity Forms with Advanced Post Creation Add-On not updating ACF fields on custom taxonomy