Created
October 22, 2012 12:01
-
-
Save simonlk/3931219 to your computer and use it in GitHub Desktop.
Get the details of the current taxonomy. This is for Woocommerce categories but would work for any custom taxonomies
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
<?php | |
$current_tax = get_query_var( 'product_cat' ); | |
$term =get_term_by( 'slug', $current_tax, 'product_cat'); | |
$term_name = $term->name; | |
$term_id = $term->term_id; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment