I have created a custom post type called “Researchers”. There is a custom taxonomy field named “modeling types” which I’m using multi-select. At first I was only able to display the taxonomy ID. I got some help in re-writing the code to display the taxonomy name(s). But the field now returns “Uncategorized”. Can someone look at my code and tell me what I’m doing wrong. I’m new to php.
Thank you for your assistance. This is what I have now. The “Uncategorized” word is now gone, but the field is displaying blank. I’m missing something and just don’t know where. Modeling Type: <?php $modelingType = get_field('modeling_types'); $term = get_term($modelingType, $taxonomy = 'modeling_types'); echo esc_html($term->name); ?>
This was the display before:Modeling Type: Uncategorized
This is the display now: Modeling Type: