It seems from the OPs answer that the problem was not to do with the template, but using an incorrect url.
To get the link of a taxonomy term you can use get_term_link()
:
<a href="https://wordpress.stackexchange.com/questions/51240/<?php echo get_term_link($term,"product_category')?>"><?php echo $term->name; ?></a>
Related Posts:
- Taxonomy, Terms, and Template Files
- How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy
- Templates for Custom Post Types and Custom Taxonomies
- Get page by template?
- Custom taxonomy query for a custom post type
- Need some templating advice for templating with custom post types and taxonomies
- Custom Post Type with Nested Taxonomy and Template Files
- Custom Post Type Archive Template
- custom post type archive template per custom taxonomy term
- custom taxonomy – Template not working
- Include different loop templates in search query
- Create separate template for shared custom taxonomy with shared terms
- Trying to manage templates on a blog with lots of custom taxonomies
- How do I provide a “show all posts” link in a paginated term archive?
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Query with no terms uses index.php template instead of archive.php
- Create template for taxonomy results limited by Custom Post Type
- Custom taxonomy and custom post type – wrong permalinks and template
- WordPress Doesn’t Generate Taxonomy Archive
- Custom taxonomy returns 404
- Template for all categories of a custom post type?
- Migrating a taxonomy’s tags to the native category
- WordPress custom taxonomy template not working
- How can I get this request to use the Custom Post Type page template instead?
- Archive for a Taxonomy of a Custom Post type
- Template files for Custom Post Type and Taxonomy
- Main query not querying any posts in custom taxonomy template
- Loop through custom posts by taxonomy and display the titles in a list, it is repeating 8 times
- Which file/template is in charge of taxonomies for custom post types?
- How to get_term_meta on single custom post?
- Get template part with CPT and Custom Taxonomy conditionals
- How to create a template to show child terms of a MAIN taxonomy
- How to change single custom post template by custom taxonomy?
- Create a custom taxonomy template that loops through child categories in term order?
- Post template with breadcrumb needs to show page navigated from
- Custom Post Taxonomy Template Not Loading Properly
- taxonomy – templates are not loading
- Custom taxonomy with custom post type template not showing
- Custom taxonomy template for custom fields loop [closed]
- Templates for CPT not working
- Single taxonomy for different custom post types
- How should i name the .php file to show custom posts under a taxonomy’s term?
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Custom Post Type tag taxonomy “Page Not Found”
- template structure for CPT not clear
- WordPress Custom taxonomy template
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Querying multiple taxonomies in URL leads to wrong taxonomy archive
- Listing all custom post types using a specific term on the said term’s template page, in groups
- Most appropriate way to display CPT’s by children terms of custom taxonomies while retaining desired permalink structure?
- Only One Post of Custom Post Type Appearing on Template Page
- Custom Post Types using wrong template (index) instead of archive-{type}.php – previously worked as expected
- Permalinks: custom post type -> custom taxonomy -> post
- How to Add Tags to Custom Post Type?
- Mixing custom post type and taxonomy rewrite structures?
- Efficient Taxonomy Intersection
- Custom permalinks – post type – hierarchical taxonomy’s
- How do I create new content pages for my Custom Post Type?
- Taxonomy posts on Archive page
- Taxonomy list. Order by a specific custom post type count
- Rewrite CPT slug with two taxonomy slug instead of one
- Custom content type meta_box_cb does not run
- Custom Taxonomy breaking pages permalinks
- How to create new category for custom post type?
- How to clone the “Projects” Custom Post type in Divi theme
- Remove url rewrites for registered taxonomies
- Received nothing after executing AJAX post function
- How can I auto-assign a CPT post to category in a custom taxonomy when published?
- Mapping Subdomains in WordPress to give the appearance of a localised site, best approach?
- Post count by month of taxonmy term
- Custom post type and custom taxonomy with the same slug using the file page taxonomy only as directory
- First custom field value (out of several) displayed twice after query
- Grouping of CPTs and taxonomies into menu groups in admin
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- filter by custom taxonomy using ajax
- How to get the current category with custom posts
- Page listing all categories for CPT
- Grab all Custom Posts by multiple taxonomies and terms
- Custom Post Types and Complex Content Hierarchy
- If custom taxonomy else conditional [closed]
- Confusion about how to use Custom Post Types, Custom Taxonomy or Category?
- How to display custom taxonomy term specific post?
- Custom Taxonomy Archive generates 404
- Support for author does not show author column in post table in dashboard
- How to make a custom search template for custom taxonomy?
- Force WordPress to only match URL in category
- Can I create a taxonomy term that mirrors the name of a new custom post?
- Rewrite for custom type and custom taxonomy
- How to create TEMPLATES for TAXONOMIES? What I have to change in this code?
- Custom Post Status & Taxonomies
- Template with Custom Post Type (Custom Tables) does not work
- how do I create a breadcrumb to work with multiple custom taxonomies
- Custom post type is_singular condtional not working when managing sidebar display
- Calling custom taxonomies
- Limit taxonomy terms added to a custom post type
- I want to understand plugin implementation of custom posts / taxonomies / metaboxes
- Sort ACF by custom taxonomy
- Is it possible to use a post name in a custom post slug?
- Dynamically count the number of custom post types associated to a custom taxonomy
- Taxonomy Archive URL + Template