The is_tax() function checks if a custom taxonomy archive page is being displayed. So it will only work in template files such as taxonomy-product_cat.php – unless you create new templates for specific categories in the product_cat taxonomy. For example, if you have a product category called “Toasters” and the slug is “toasters” then the template file would be taxonomy-product_cat-toasters.php, and if that doesn’t exist then the taxonomy-product_cat.php template is loaded instead.
See this page for template hierarchy: http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display
Related Posts:
- Include and Exclude Taxonomies From Archives & Feeds Using ‘pre_get_posts’
- Check if current term is a child of another term
- How to hide custom taxonomy archives same way as hiding custom post types?
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- Page queried instead of a custom taxonomy
- Using a different template per Custom Taxonomies for single term archive pages
- Creating an Archive using a Custom Taxonomy
- Display direct children of the current custom taxonomy in taxonomy.php template
- Date archive permalinks for custom taxonomy
- Taxonomy archive showing no results
- Dynamic loading of Archive content based on custom taxonomy term name
- List taxonomies according to whether this post is in another taxonomy in taxonomy archive
- orderby meta_value breaks taxonomy term archives
- Why is the custom taxonomy archive page redirecting me to a single post? [closed]
- How to have two different versions of a tag/category/taxonomy archive page?
- Automatically Give All Custom Post Types a Pre-Set Category [duplicate]
- How to add Post Format Taxonomy Archive page in the menu?
- How does WordPress Parent-Child Taxonomy actually Works?
- Custom taxonomy archive shows 404 error
- Custom Taxonomy index/archive hierarchy
- Filter custom taxonomy archive posts by 2nd custom taxonomy using select dropdown
- Custom Taxonomy Term Archive Page Template that Filters 2 or more Taxonomies
- How to use multiple archive templates for a taxonomy?
- how does the wordpress rest API work
- Taxonomy archive template that shows posts from more than one taxonomy
- Custom Taxonomy List with Children
- why the archive of custom taxonomy term shows nothing?
- Can I output a custom taxonomy as a submenu in the site navigation menu?
- Add terms to a taxonomy archive from within the same taxonomy
- Custom Taxonomies Archive Page 404
- How to create archive pages for metadata query generated posts (so without taxonomy)?
- How to create a completely functioning separate archive for posts from only 1 or 2 specific categories
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- Hierarchical taxonomies in permalink cause 404 for sub term archive
- How to get a terms and posts associated with another term?
- Change the Page Title of the Archive Page for Portfolio Tags
- Custom taxonomy return 404
- What’s the url queryvar for a taxnomy archive?
- Multi level archive
- Custom Taxonomy Archives Page Errors
- index.php Not Showing Custom Posts / Terms
- Custom Taxonomy Archive Page for Parents AND Children?
- Redirect or Prevent Viewing of Custom Taxonomy’s Archives?
- Creating a Taxonomy Page [duplicate]
- Exclude 2 in 3 terms of A Taxonomy from all Archives
- Permalinks not working on MU network with domain mapping
- Custom Taxonomy Archive URL rewrite
- Can you orderby slug in a taxonomy archive page using WP_Query?
- More than one Hierarchical Taxonomy and SEO
- Getting Catategory / Taxonomy Description on Non-archive Pages
- Taxonomies starting with a hyphen (minus) to assign B.C. dates to a post
- Custom taxonomy archive empty
- Why my archive title isn’t showing?
- Creating a custom archive page for WooCommerce products based on tags
- Custom columns on edit-tags.php main page
- Is it possible to add taxonomies to user profiles?
- Get terms from multiple taxonomies
- How to restrict on selecting child taxonomy
- Is it possible to sort the post based on a custom field?
- How do I get terms as a list for a specific post?
- How get custom field from custom taxonomy?
- What are terms and taxonomy, how they related to post and how these three are stored in database?
- Get multiple term objects by ids
- Echo custom taxonomy term name
- Get post type from taxonomy or category page
- Move terms from one taxonomy to another keeping the hierarchy
- How can I get WP to build a feed based on multiple taxonomy terms
- Getting the selected terms for custom taxonomies in the editor
- Set custom post type terms by id without knowing taxonomy
- Catchable fatal error on custom category post
- How to add contents of a custom field to a taxonomy term list?
- How to target parent product category and its children using WooCommerce?
- Custom Taxonomies not retaining hierarchy while importing from one site to another
- Remove custom taxonomy column from my custom post type columns
- Check if custom taxonomy has posts with get_categories()
- Terms Per Page in custom taxonomy Admin
- How to get list of only custom taxonomies?
- Disable a Custom Taxonomies default save mechanism
- Replicate Drupal form options as taxonomies?
- Random category URLs not working
- Listing only custom post types with two required categories?
- custom taxonomies label in hebrew
- Product custom taxonomy is not found when space in name
- Display term picture of each post in a loop
- Custom taxonomy only gets saved in quick edit
- How to exclude the common terms?
- Get tags name under custom taxonomy in wordpress
- Show message if term slug changed
- Get post meta value outside of the loop
- Unable to create a new taxonomy
- Code inside conditional is_tax() only working when term has posts
- Get link for taxonomy to show top-level terms
- Invalid taxonomy with custom script
- Can I make a taxonomy meta box into dropdowns for each parent category?
- sort Posts by custom user filed
- Change order custom taxonomy
- WordPress taxonomy radio buttons
- Trying to achieve row posts below category with multiple loops in custom tax
- Removing fields from category/taxonomy edit form
- Remove ‘portfolio’ from URL