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
- Exclude a category from WP_Query
- 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
- 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
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- 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
- Custom/separate categories for custom post type
- Custom taxonomy template not working with simple loop. Multiple CPT using the same taxonomy
- Display Custom Category (taxonomy) Name in Custom Post Type
- Show Post Count of a Category
- taxonomy template for custom post type the same as the archive
- Get categories and descriptions from custom post type
- Combining custom post type and post category
- How to create new category for custom post type?
- Insert HTML inside link in a walker
- Set menu active state for custom posttype and category, given custom taxonomy term
- Custom template won’t load for a custom post type (custom permalinks used)
- Display all posts in main category and 1 subcategory
- How can I auto-assign a CPT post to category in a custom taxonomy when published?
- get_category_parents for custom post type taxonomy
- 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?
- 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
- 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 get custom posts sub category link
- List of Posts and Categories
- in_category for custom post types
- 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?
- Targeting categories in custom fields
- Listing all slugs?
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- category list with cutom post count
- Show categories of custom post type and not all posts
- Custom post type categories gives 404 error
- Get child categories of custom taxonomy category?
- Query Posts that have Custom Taxonomy
- 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
- Can’t pull posts of a Custom Post Type based on the custom taxonomy of the CPT
- Custom post type specific category box
- Custom Taxonomy Taxonomies of Same Name point to first created URL
- Displaying custom taxonomy menu in custom post type archive
- Advanced archive url structure (category, tag and date)
- Archive page of CPT’s custom Taxonomy
- Getting Same Description in All the Custom Taxonomy Posts
- How to show related posts of category on post within custom posttype
- pagination problem listing custom post types of taxonomy in wordpress
- Create custom post type categories
- Static Front Page not working for custom theme
- Set a Default CPT taxonomy by taxonomy id
- Custom taxonomy with custom post type archive page
- How to manage a dynamic multi-level page hierearchy system?
- Categories manage
- Only show categories that have posts within custom post type
- Help with Travel Guide Setup
- Custome post type “tags” pick default archive instead of custom post type archive
- Customize url from the_terms
- How to Show all Values in category.php page using post_type
- Custom post type archive page not showing on archive-posttype.php
- Custom taxonomy in custom post type archive with pagination
- Pagination fault in custom post type archive page [duplicate]
- Post Editor: display categories from current post type taxonomy only?
- Get a list of categories ids
- Why is this custom post type defaulting to archive.php?
- Trying to create hierarchy between 3-4 custom post types
- Customize category URL
- title tag for custom post type remove taxonomy name from title tag
- Display a custom post type list by taxonomy term
- Custom taxonomy archive page not routing?
- Return Custom Post Type Categories
- Highlight specific menu item when custom post is page
- How can I show second most recent post in sidebar, if most recent post is open in the browser?
- 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
- How to get the proper category in permalink with custom post type assigned to multiple categories