Created
August 9, 2015 03:56
-
-
Save kostiantyn-petlia/f8b5094dca81e6a135fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get current taxonomy-slug in template taxonomy-{taxonomy}.php | |
$term = get_term_by('slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); | |
echo $term->slug; | |
// get full info of taxonomy | |
$the_tax = get_taxonomy( get_query_var( 'taxonomy' ) ); | |
echo $the_tax->labels->name; | |
// get taxonomy-type current | |
echo get_query_var('taxonomy'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment