How to get name of taxonomy
-
HI,
I want to retrieve the name of a taxonomy that I created in back-end.
In case of that taxonomy be empty I want to display a message in the same space in order to the site keeps the good configuration.I have the following to get the terms:
foreach($terms as $term):
$term_link = get_term_link($term->slug,$term->taxonomy);
$term_name = $term->name;I’ve tried to do something like:
if($term->taxonomy== NULL || $term->taxonomy== ”)
echo “nothing”;
else $term_name = $term->name;But not worked.
Some suggestion how to do it? Or some way to retrieve the name of taxonomy like $term->taxonomy{attribute_name} ..Thanks.
- The topic ‘How to get name of taxonomy’ is closed to new replies.