Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Talk:Function Reference/is tax

Checks WP_Query, not specific posts?

Is_tax only checks the WP_QUERY to see if the page is part of the taxonomy, it does not check do a specific check on the post(s) being shown. This does not seem to work on a single post at all.

http://core.trac.wordpress.org/browser/tags/3.7/src/wp-includes/query.php#L278


The function is not intended to check whether a post is in a given taxonomy. It "checks if a custom taxonomy archive page is being displayed". It checks if the current $wp_query is for a given taxonomy - presumably the posts displayed will be in that taxonomy. If that is not true in your case, then maybe there is a bug. Probably this would be caused by some custom code that is using query_posts() and overwriting the global $wp_query object.
Jdgrimes 19:25, 28 October 2013 (UTC)