[Resolved] Display current taxonomy name on taxonomy.php
I just can’t figure out how to display the taxonomy name when I’m viewing results on my taxomomy.php.
I have this at the top:
<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?> printf( __( '%s', 'twentyten' ), '<h1>:Posts by : ' . $term->name . '</h1>' );
Now it is working beautifully, only I can’t see the name of the current taxonomy, only the term’s name is showing up.
I can use this:
<?php echo $taxonomy; ?>
But it returns the slug of the taxonomy and not the name or the singular name.
My taxonomy slugs are abbreviations and I obviously cannot display those. If I change the slugs to normal words in functions.php and in taxonomy.php the already stored values are lost. (not lost but stored with the previous key and I really don’t know how to update/change these in phpmyadmin).
Has anybody any idea how to display/show/query/ the actual name of the term’s taxonomy?
- The topic ‘[Resolved] Display current taxonomy name on taxonomy.php’ is closed to new replies.