To Fix it, simply set with_front to false where the custom post types are registered:
'rewrite' => array('slug' => 'portfolio', 'with_front' => false),
With this Custom post type will not get 404 error
Related Posts:
- Where is the old post permalink slug stored?
- Use category base slug in posts’ permalink
- Custom Post Types, slug, archive and SEO plugins
- Disable WordPress’ blogging functionality and disable ‘posts’
- How to automatically generate a unique random slug
- Post slugs and images cannot have same name?
- Change the Slug of Post Type post to baseurl/post/%postname%
- How to control which category will be picked for the slug of a post?
- Change slug with custom field
- How do I convert a mathematical Microsoft Word document to a WordPress blog post?
- widget should display post archive by year and on click also by month
- Determining Slug Before and After Edit
- how to display full post with pagination on home page
- blog page showing only first post
- How to update all post at once?
- Single Post Gallery Using Shortcode
- Showing random content / pictures from earlier posts in a sticky post?
- How to share same post to multiple site in wordpress?
- generate unique slug while inserting post
- How do I get the slug of a custom taxonomy category of a post?
- Side by side blog posts that are tied together
- How to show a full post, not just an excerpt
- How to get posts by multiple post slugs? [duplicate]
- Define a name to the posts slug
- Custom excerpt length filter doesn’t work
- How to get the post’s parent ID?
- Limit Gutenberg blocks available to users to choose from
- Bulk update post slugs through database
- Blog Posts not showing title
- Remove certain post-formats from showing in blog?
- How blog page in WordPress works : blog page retrieve first post ID
- Blog Posts in Custom Menu
- Why is my Blog Page ID == First Post ID?
- Displaying Latest Posts on a Page
- Add blogs to “Blogs i Follow” sidebar [closed]
- How to make number of blog posts a custom field?
- Choose whether to automatically add a taxonomy with the same name as the post
- How can i display gallery shortcode output under Post text
- Display posts from a different website on Genesis Responsive Slider
- WP Bakery Load More Button loads the same posts
- add new post default view
- Show certain posts in a LIST format that members have been granted access to
- Append class to posts page
- How to have posts have a parent in permalink like site.com/blog/postname
- How to disable WordPress blog folder
- Automatically add date to the auto generation of post slug
- How to handle broken links created by permalink/slug changes?
- How could I change my Permalink from blog to custom structure? [closed]
- Posting blog entries in screenplay format
- Visting slug for ‘post’ post type shows 404 not archive?
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- how do i add posts-page slug before posts slug in permalinks
- Single.php – Get Current Parent Category
- How to remove in-line style of WordPress’s post content only?
- How to get a post’s content? [closed]
- Disable WordPress Archive Conflict Check
- WP move posts to different path
- Append ‘Continue Reading’ link if post length is more than 3 lines of text?
- older blog posts not showing in new theme
- Two Custom Post Types with Identical Articles Competing for the same Slug
- WordPress custom post type with folder structure in slug
- Why won’t pagination work?
- WordPress Query Posts From Category Post on Static Page
- my post slug gets really long and I can’t change it
- Replace image name on upload to the new post name on front-end form
- Edit the post title from the frontend
- How to create a page that shows the last 10 posts?
- Show custom post with custom categories with specific slug
- My post permalinks are always the same
- How to put the WordPress blog into theme
- If I moved the location of my generic “posts” page, do I need to change the slugs for all of the individual posts?
- Why the blog posts is not showing?
- post_name is not stored until post is published… where should I store my slug until it goes live then?
- Edit Posts Page but not category specific pages?
- Post as frontpage – avoid duplicate content
- Blog styling in SASS
- Link post to blog from a static page
- Hide first blog post in content and output it in widget
- How can I have the posts from one word press blog show on the presentation page of another word press site
- Page updates appear in Preview but not live version?
- new blog post does not appear in blog after publishing
- Posts don’t appear on the Blog page
- Get image paths from RSS feeds
- 2 tick boxes appearing below comments
- Wanting to apply different featured images for each post
- retrieve post slug by post_tags taxonomy
- long blog post on self hosted wordpress blog not displayed
- Show all posts in category
- Echo author slug in post edit page
- WordPress Custom Theme: My site shows the same posts on Page 1 and Page 2 and so on [duplicate]
- Post only showing on homepage when Logged in – direct URL still working
- Posts not showing up on Blog page
- The page that displays Posts on homepage
- How to add a widget area between blog posts in Genesis Framework?
- How to save the same post in multiple blogs?
- Is there any point to using wp_unique_post_slug?
- Need to show birthday of custom post type(Famous people in this case) in elementor. Date of birth set in custom fields
- Show category name in category.php when posts assigned to multiple categories
- Permalink issue with new blog posts > getting 301 redirect
- Blog page shows the whole blog post instead of the excerpt or summary with the feature image only