From what it sounds like, the archive for your “portfolio” custom post type works if it lists all portfolio posts, but if you click on your custom taxonomy within a post, it goes to the default archive.php.
Since this is custom taxonomy, it’s not going to use your archive-portfolio.php because all that does is apply to the listing of all your portfolio posts, not their taxonomy. So what you likely need is a taxonomy template:
Custom Taxonomies Display on the Codex
If you look at the Template Hierarchy section on the Codex, you’ll see that when WordPress gets to an archive – it looks for several files before defaulting to archive.php. That order is:
- taxonomy-{taxonomy}-{term}.php
- taxonomy-{taxonomy}.php
- taxonomy.php
- archive.php <– Where you’re defaulting because the above templates do not exist
- index.php
Hope that helps! 🙂
Related Posts:
- Custom post type category permalinks and archive pages
- Custom post types not displaying per category
- Help with Multi Level Category Archive Page
- Filtering a custom post type by custom taxonomy in archive template
- Exclude a category from WP_Query
- How can I list all the categories under a Custom Post Type (taxonomy)?
- How to build a complex page structure
- How to filter custom post types by custom category taxonomy
- Is there a way to use regular categories with custom post types?
- How to list all categories and tags in a page?
- remove support for ‘Categories’ for a custom post type
- Is it possible to have an index page for taxonomy term for each custom post type it is assigned to?
- How to get_queried_object on multiple objects?
- Glossary with Custom Post Type
- Custom-Taxonomy as categories: Remove “most-used” tab?
- Custom Post Type / Taxonomy Slug / Post Title with post type archive
- Filter get_categories() for taxonomy term in WordPress
- Hide child term posts on parent term pages
- Posts per Page on custom Taxonomy Template
- Post type archive page not working
- Create template for taxonomy results limited by Custom Post Type
- wp_list_categories() – current-cat class also inside posts?
- Extending AZIndex plugin to use custom post types and custom taxonomies
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- Show a Category X’s custom post type on Category X archive page?
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- Use Custom Post Type archive page for the taxonomies term archive page
- Display custom post type category, while in a CPT category, then the posts beneath
- Hide parent categories when clicked, and show it’s childs
- Limit amount of posts made within a custom taxonomy
- Filter CPT posts by one or more categories
- Getting categories of posts under a custom taxonomy
- Can’t remove front from permalinks for custom taxonomy category page
- Number of Custom Post Types published are not being shown in the custom page
- How to edit this code to get the categories in achieve page?
- Hierarchy and access control for Custom Post Types (CPT)
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- How to get custom posts sub category link
- posttype/taxonomy/term archive page 404 error
- browse by category and tags?
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- List of Posts and Categories
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Custom Post Archive is not working
- WP the_posts() on single-cars.php get category link
- in_category for custom post types
- What’s the name of the custom post type yearly archive template?
- Get parent category id from child category page for custom taxonomy
- How to add current custom taxonomy slug to body class
- List Posts By Custom Taxonomy
- get_category_link() for custom post type does not include custom slug rewrite?
- How to Display Posts From Category Within a Custom Taxonomy?
- Disable custom taxonomy on admin bar
- Why does my taxonomy have a category style div id?
- Targeting categories in custom fields
- Alphabetically sort a taxonomy.php template by post title
- Listing all slugs?
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- Permalink problems with custom post type and custom taxonomy
- sort CPT on Custom Taxonomy Archive page
- category list with cutom post count
- The Difference Between Categories and Tags and Taxonomies and Terms
- Include custom post type custom taxonomies in Categories widget
- Use the custom post type archive for taxonomies?
- Custom Post Type Categories URL not displaying posts
- Custom Post type date archive for custom taxonomy
- Show categories of custom post type and not all posts
- Custom post type categories gives 404 error
- get_terms() parent, child and grandchild
- Get child categories of custom taxonomy category?
- Query Posts that have Custom Taxonomy
- List child categories from parent category on custom taxonomy page
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Getting custom taxonomy posts on archive page
- Custom post types category
- Archive page for custom post type and custom taxonomy
- Get terms for a specfic post from multiple taxonomies in custom post type
- Can’t pull posts of a Custom Post Type based on the custom taxonomy of the CPT
- Custom post not appearing under custom taxonomy category
- Retrieve Custom Taxonomies with Description and Slug
- Custom post type specific category box
- Custom Taxonomy Taxonomies of Same Name point to first created URL
- CPT archive page – show one post from each taxonomy term
- how to organize my categories or should I do custom post types for some?
- Displaying custom taxonomy menu in custom post type archive
- Advanced archive url structure (category, tag and date)
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
- Can’t Get Parent and Child Categories of Custom Taxonomy to Display
- Custom Post Types using wrong template (index) instead of archive-{type}.php – previously worked as expected
- Show custom post type on post category page doesn’t work / breaks navigation
- How can I show second most recent post in sidebar, if most recent post is open in the browser?
- Is it possible for post and custom post type to share a category base slug?
- How to add categories to a custom post type using wp_insert_post($new_post);
- How to work with URLs where sometimes a post or a subcategory is in the same part of the URL structure
- WP Query filtering by custom category not showing all relevant posts
- How to get the proper category in permalink with custom post type assigned to multiple categories
- Category display using conditions
- Rewrite taxonomy permalink appended to CPT archive url