It is because of
'has_archive' => true
which instruct wordpress to look for an archive template for the CPT. If you have a page with the same slug (portfolio) it will never get to display it as everything gets priority over pages.
Related Posts:
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- Remove taxonomy slug from a custom hierarchical taxonomy permalink
- Rewriting a custom-post-type permalink with taxonomy term?
- Custom Post Type Permalink / Rewrite not working immediately
- What are the differences between custom post type and custom page templates?
- Ordering Posts List By Taxonomy Terms?
- Templates for Custom Post Types and Custom Taxonomies
- How to modify URL structures in custom post types and taxonomies or terms
- Create permalink structure for one taxonomy archive per custom post type
- Custom permalinks
- array_pop() expects array, boolean given for $event_type_term ->slug
- Understanding Permalinks on Custom Post Types
- custom post type permalinks with category and tags
- Add links to post categories and taxonomies in wysiwyg link modal?
- Custom Permalinks for Custom Post Types and Taxonomies
- How to rewrite custom post type URL for multiple depths instead of one specific depth
- Maintaining WP_Query Relation Among CPT, Custom Taxonomy, Permalinks- CPT UI
- Custom post type category, taxonomy and URL rewrite problem
- Define permalinks for custom post type by taxonomy in WP 3.4
- Remove taxonomy slug when not assigning taxonomy with custom post types
- Custom Post Type: How to display all of same taxonomy?
- Remove “-2” from a Toolset Types URL with the same post name
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- Remove Taxonomy Slug when No Taxonomy is Assigned to Custom Post Type?
- Include taxonomy slug in url?
- Custom permalink – append taxonomy name and term name at the end of permalink
- Programmatically adding posts
- Multiple portfolios with one custom post type?
- custom post type and custom taxonomy url conflict
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- multiple url slug for single custom post type
- Add hierarchical taxonomy to permalink for custom post type
- Custom post types, taxonomies, and permalinks
- How to specify URLS for custom posts & taxonomies
- Custom post types, taxonomies, and permalinks
- Permalinks not working for custom taxonomy on custom post type
- custom permalinks based on taxonomies for custom post type
- Custom taxonomy in URL showing 404
- Custom Post Type permalink shows wrong page: homepage/index.php
- Custom-Posttype & Custom Taxonomy WP_Query
- Custom post type url with category
- Adding custom post category slug in permalink causes 404 error for pages and posts
- How Can I Change the Custom Post Type Slug to the Taxonomy Slug in the URL?
- Use same slug base for Custom Post Type posts, and multiple taxonomy terms
- create a subcatagory for a custom post type and out put url as posttype/subcategory/item
- Show custom post archive when custom post not specified
- Show custom post type relationships by taxonomy
- Permalinks: custom post type -> custom taxonomy -> post
- CPT’s with landing page instead of archive – Url Rewrite?
- Custom post type permalink tag 404
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- Custom post type and taxonomy permalinks
- Hierarchical permalinks for custom post type and taxonomy
- set permalink for CPT
- Custom permalink with child taxonomy terms
- Custom post type Permalinks with hierarchical Taxonomies
- How to solve this custom post type goes to 404 page?
- Can’t use pagination with custom taxonomy
- Permalink problems with custom post type and custom taxonomy
- Custom Post Type Advanced Slug
- How to get all posts related to particular category name on button click?
- WordPress custom permalink and archive link for custom post type
- Custom post type category permalinks and archive pages
- Loop and add Specific Categories and Products Images
- Safe to throw 404 error in request filter?
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
- Custom Permalink For Custom Post Type – Working Fine But Broken For Pagination
- Set priority to permalinks
- Is there a way to use ‘publicly_queryable’ => false only on specific taxonomy term?
- Changing CPT permalink
- Changing permalink of default Post with custom post
- Custom Taxonomy Archive generates 404
- Custom post type single with custom URL structure
- How to change URL structure for custom post type in wordpress? Custom taxonomy + custom Post name [duplicate]
- Remove CPT Slug with 2 taxonomies and 1 post meta
- Custom post type and taxonomy same slug
- How to create a permalink structure with custom taxonomies and custom post types
- How to structure a website with custom post types and custom taxonomies?
- Pagination not working (page/2 retunring 404 page)
- Template hierarchy changes when custom post-type permalink leverages custom taxonomy
- Associate custom CPT with another CPT’s taxonomy and rewrite permalinks
- Post Custom & Taxonomy 404 error
- Custom Post Type Taxonomy – Permalinks generating, but posts not found
- Multiple archives for cpt, taxonomies, terms
- Custom taxonomy in custom post type archive with pagination
- Same permalink structure for all post types?
- How to add base permalink to custom posts?
- Custom Post type and Taxonomy in post URL error
- Hierarchical taxonomy in permalink structure
- How to retrieve the permalink for a specific (custom) term?
- Permalink Trouble with Custom Post Type
- Category / Custom Post Type permalink issue
- Adding rewrite rules to Custom Post-type mixed with Taxonomy
- Dynamically change Custom Post Type Template OR Change Permalink?
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Add /blog to the “post” post type url
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- Hide custom post type slug url from search engine [closed]
- Modify permalink of CPT archive to support two taxonomies
- Permalinks for Custom Post Types and Taxonomies