If we look at the register_post_type
documentation, in the rewrite option, there is a sub-option that controls this:
'with_front'
=>bool
Should the permalink structure be prepended with the front base. (example: if your permalink structure is /blog/, then your links will be: false->/news/, true->/blog/news/). Defaults to true
So something like this:
...
'rewrite' => [ 'with_front' => false ],
...
Related Posts:
- Custom Post Type “MUST NOT” be able to search via URL
- Permalinks for Custom Post Types and Taxonomies
- Custom Post Type Permalink / Rewrite not working immediately
- How to remove /blog/ prefix for custom post types in permalinks?
- Using /%postname% for a custom post type
- WordPress Custom Post Type is Matching on Partial Slug
- Change slug of registered custom post type in child theme
- Templates for Custom Post Types and Custom Taxonomies
- WordPress search: pretty URLs (permalinks), custom post types and pagination
- How to achieve this permalink -> category-name/custom-post-type-name/post-name
- Custom permalinks
- Permalink for CPT with taxonomy
- Custom post type permalink changing itself every other change
- Add links to post categories and taxonomies in wysiwyg link modal?
- Custom post type’s get_permalink returns wrong url
- ACF Relationships in Custom Post Type Permalink
- Prepend meta_value to permalink of post
- Custom Permalinks for Custom Post Types and Taxonomies
- Removing parent slug from URL on custom post type
- Maintaining WP_Query Relation Among CPT, Custom Taxonomy, Permalinks- CPT UI
- Custom post type category, taxonomy and URL rewrite problem
- Rewrite on custom post type permalink not working?
- Remove taxonomy slug when not assigning taxonomy with custom post types
- Custom Post Type: How to display all of same taxonomy?
- Custom post type permalink missing /post_type/ front
- Remove POST_TYPE from custom post type permalink
- Remove “-2” from a Toolset Types URL with the same post name
- Add extra parameters after permalink?
- Custom permalink structure for custom post type
- Custom post types and permalink
- custom post type default permalink
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- Share parent path between Custom Post Types and Pages?
- Custom post types, taxonomies, and permalinks
- How to specify URLS for custom posts & taxonomies
- How do I get the permalink structure to work like this?
- Permalinks not working for custom taxonomy on custom post type
- Is it possible to place custom post type files inside a folder in theme directory?
- Linking to the most recent post in a Custom Post Type
- Custom Post Type permalink shows wrong page: homepage/index.php
- Get term name and term parent into custom post type permalink
- Rewrite rules for custom posts types
- Does WordPress consider a post name unique if that same post name is in multiple Post Types?
- Custom post type as home page with custom url
- URL rewrite add author as base
- Parent Page and Breadcrumb URL’s for Custom Post Types Not Working
- CPT’s with landing page instead of archive – Url Rewrite?
- How to give all CPT a folder automatically based on their slug
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- Define/declare new custom types with fields in plugin?
- Hierarchical permalinks for custom post type and taxonomy
- How to organize hierarchical structure in custom post type with taxonomy (like with categories)
- Custom Post Type – Duplicate Page Slugs
- How to produce a sub-page-system in WordPress
- Remove permalink for custom post type
- Check post on publish for blank title
- Best way to specify “article type” in URL
- Custom Permalinks with meta value not working. Why?
- How to group navigation items in the admin panel
- How to have permalink like domain.com/term/postname?
- Post type Permalink
- Custom Post Type with Configurable Sidebar via ACF
- Setting a homepage – doesn’t seem to work
- Improve Custom Post Permalink Structure
- Passing variables through permalink structure in custom post types
- Using page title as a link to term archive
- Custom post type 404 error on “default” or “numeric” permalinks
- Permalink Trouble with custom post types
- Custom Post Type – Main page for certain posts
- Pagination does not work on Custom Post Type archive while trying to get load more function working
- How to mass get post editor URLs
- Error 404 change permalink term custom term taxonomy
- WordPress URL rewrites using Advanced Custom Field
- Preview url not working outside wp-admin
- Custom post type defaults to index.php for archive page
- How to merge 2 custom post type permalinks
- Adding categories to custom post type in permalink
- Create custom YouTube-like permalinks for multiple custom post types
- Pretty permalink structure with multiple (AND OR) taxonomies
- 404 custom post type
- Custom post URLs
- WordPress Permalink Custom Post type
- How can I add a “fake” parent into the permalink?
- Permalink of custom post type partly broken
- Custom Post Type Archive Links Not Working
- Custom Post Type Categories Not Maintaining URL structure any more
- Add category slug as class attribute in a link array
- Get post id of permalink for a specific custom post type?
- Custom Post Type Permalink
- URL Rewrite Adjustment for Custom Post Type causes template to revert to index.php
- Add taxonomy to custom post type archive
- Custom Post Type – Rewrite slug [duplicate]
- Custom Post Type Permalinks with %category%
- Custom post type – permalink
- Permalinks Works for Custompost type but not with pages Why?
- Custom role can’t create permalink
- Custom post types permalinks not working
- Rewrite rules for using the same base slug for multiple content types
- How to get permalink of post based on post name?
- Two Permalinks with one Taxonomy (custom taxonomy) and (custom post type -> custom taxonomy)