Hi,
i have found the solution, and created a function to make it easier
if it can be integrated into carbon fields it would be great
function carbon_get_the_term_meta( $taxonomy = 'category', $field_name ) {
$term = get_query_var( $taxonomy );
$term = get_term_by( 'slug', $term, $taxonomy );
return carbon_get_term_meta( $term->term_id, $field_name );
}
Hi @alexadark,
Here is a simpler solution to fetch the meta value for the currently queried term:
carbon_get_term_meta( get_queried_object_id(), 'crb_hero_tax_image' );
Function Reference: get_queried_object_id()
-
This reply was modified 9 years, 7 months ago by
htmlBurger.
Great!
Thank you
you should have this type of things in the doc, it would be super usefull