Display parent category name on taxonomy
-
Hello everyone, i would like to see on one page the taxonomy name and che parent category.
I tried this way but i can’t get the category name 🙁
<?php $term = $wp_query->queried_object; echo '<h1>'.get_cat_name($term->parent).'</h1>'; // not showing :( echo '<h2>'.$term->name.'</h2>'; //it's ok ?>
- The topic ‘Display parent category name on taxonomy’ is closed to new replies.