Is there a way to pull taxonomy name just by using term id? Like i have a term_id and i don't know which taxonomy it belongs to and need to get the taxonomy name that it belongs too. any way?
Thanks!
wp_get_post_terms( int $post_id, string|string[] $taxonomy = 'post_tag' array $args = array() ): array|WP_Error. Retrieves the terms for a post.
Go to your WP-admin ->Settings menu a new “Taxonomy Image” page is created. Go to your WP-admin ->Settings ->Taxonomy Image displayed in the taxonomies list form where you can select the taxonomies you want to include it in WP Custom Taxonomy Image.
You can use get_term(): https://codex.wordpress.org/Function_Reference/get_term
$term = get_term( $term_id );
echo $term->taxonomy;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With