Reputation: 77
I want show taxonomy name of specific ID. I tried with this code, but doesn't work.
<?php echo get_term_by('id','103', 'casestudies_category') ?>
Upvotes: 1
Views: 208
Reputation: 2588
The query returns an object not actual data, see https://developer.wordpress.org/reference/functions/get_term_by/
You will need to access the name you need to use the following:
$term = get_term_by('id','103', 'casestudies_category');
echo $term->name;
Upvotes: 3