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
- How can I list all the categories under a Custom Post Type (taxonomy)?
- How to build a complex page structure
- How to get_queried_object on multiple objects?
- Custom Post Type / Taxonomy Slug / Post Title with post type archive
- Post type archive page not working
- Should I change these content meta types before building complex archive page?
- Custom edit post column – category not showing
- Getting taxonomy terms used by custom post type
- Taxonomy list. Order by a specific custom post type count
- Archive or taxonomy pages not working for custom post type
- How to show custom taxonomy in the permalink?
- How to create archive page for taxonomy terms within custom post type
- Custom post type taxonomy template
- Categories and Tags not working!
- Custom/separate categories for custom post type
- get_categories() for only CPT
- Display types of posts in edit.php instead of All, Published, Scheduled and Draft
- custom taxonomy archive by year
- Display Next/Prev when looping Custom post-types archive?
- taxonomy template for custom post type the same as the archive
- Display only post types that are direct children of the current taxonomy
- Get categories and descriptions from custom post type
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- How can I filter by taxonomy on a custom post type’s page?
- How to create new category for custom post type?
- Weird problem happening with custom taxonmy when creating/updating posts
- Custom Post Types and independent Categories – complex Taxonomy
- Should I use custom taxonomy or custom post type
- CPT Archive with core Category
- Custom template won’t load for a custom post type (custom permalinks used)
- Custom Post Type Archive Page Filtering
- How can I auto-assign a CPT post to category in a custom taxonomy when published?
- Custom Post Type With Categories
- Categories sorting
- Allow user to set custom order to a list of custom taxonomies?
- Create template for taxonomy results limited by Custom Post Type
- Categories of custom taxonomy don’t show any posts
- Show a Category X’s custom post type on Category X archive page?
- Use Custom Post Type archive page for the taxonomies term archive page
- 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?
- posttype/taxonomy/term archive page 404 error
- browse by category and tags?
- List of Posts and Categories
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Custom Post Archive is not working
- 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
- Disable custom taxonomy on admin bar
- Why does my taxonomy have a category style div id?
- Alphabetically sort a taxonomy.php template by post title
- Permalink problems with custom post type and custom taxonomy
- sort CPT on Custom Taxonomy Archive page
- The Difference Between Categories and Tags and Taxonomies and Terms
- Use the custom post type archive for taxonomies?
- Custom Post Type Categories URL not displaying posts
- Custom Post type date archive for custom taxonomy
- get_terms() parent, child and grandchild
- 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
- Custom post types category
- Get terms for a specfic post from multiple taxonomies in custom post type
- Custom post not appearing under custom taxonomy category
- CPT archive page – show one post from each taxonomy term
- how to organize my categories or should I do custom post types for some?
- 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
- How to divide Subcategories into pages of parent category wordpress
- Custom front-end form for adding post – Category problem
- How to display custom taxonomy term specific post?
- Displaying all posts by category and showing content on click
- Posts per Page on custom Taxonomy Template
- Show Custom Post Type based on Category on Archive Page
- Custom Post Type / Taxonomy / Term – what template to use to avoid 404-page?
- Custom category taxonomy – archive page not showing up
- Custom post type post_type_link gives “page not found” on any other custom post type
- Custom post type category archive URL redirects to home page
- Dropdown switching subcategories portfolio
- Display custom Taxonomies same as listing Categories
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Display 2nd category, only once, as sub-heading, in the loop
- Category / Custom Post Type permalink issue
- How can I set up the URL for a category archive for a custom post type?
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Remove slug from Custom Category Permalink + dual-category permalinks
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- 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
- Is it possible for post and custom post type to share a category base slug?