Custom Taxonomies and current taxonomy term ID
-
I hope someone may be able to help me here.
I have followed the excellent tutorial series here:
http://justintadlock.com/archives/2009/05/06/custom-taxonomies-in-wordpress-28
and here:
http://justintadlock.com/archives/2009/06/04/using-custom-taxonomies-to-create-a-movie-databaseI find myself needing to retrieve the current custom taxonomy term ID similar how it is done here for tags:
http://wordpress.org/support/topic/305892?replies=4what I’m using for tags is this inside the tag.php
$term_id = get_query_var('tag_id'); $taxonomy = 'post_tag'; $args ='include=' . $term_id; $terms = get_terms( $taxonomy, $args );
Now I need to do the same for my custom taxonomy but I can’t seem to nail it. What I don’t understand is the tag_id in get_query_var(‘tag_id’) is coming from where? Where can I find a list of the variable keys the get_query_var() function can take?
- The topic ‘Custom Taxonomies and current taxonomy term ID’ is closed to new replies.