Not sure if I understood you right, but there’s an option when registering the custom post type:
register_post_type( 'your_cpt_name', array(
'rewrite' => array( 'with_front' => true )
) );
Related Posts:
- Interesting Custom Post Type Slug with Taxonomy and Custom Field
- Remove slug from custom post type post URLs
- Redeclare/Change Slug of a Plugin’s Custom Post Type
- Theme localization of “slugs” (custom post types, taxonomies)
- Custom Post Type Slug / Page Slug Conflict – Prevent use of reserved slug on page save?
- Change permalinks for posts but not for custom post types
- How do I get a post (page or CPT) ID from a title or slug?
- How to get custom post type label and singular label from its slug?
- Custom Post type & Taxonomy URL structure
- custom slug for custom post type
- Slug Formatting : Acceptable Characters?
- Disable permalink on custom post type
- Get list of all registered post types slugs
- Combining Multiple Taxonomies in one URL
- Using Custom Fields in Custom Post Type URL
- Change slug of registered custom post type in child theme
- Taxonomy archive with same slug as custom post type?
- Dynamic taxonomy in permalink made all other posts NOT FOUND?
- Post slug changed using code doesn’t reflect on editor when post is published
- How to achieve this permalink -> category-name/custom-post-type-name/post-name
- Taxonomy page returns 404 page not found
- Prepend meta_value to permalink of post
- Custom Post Type – Same Post Name, Different Post Type
- Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url
- Setting a title on a Custom Post Type that doesn’t support titles
- Reslug a Custom Post Type
- Removing CPT slug from URL results in 404 error for archive page
- Custom Post Type pagination when CPT ‘rewrite’ rule and a page have the same slug
- Remove Slug from Custom Post Type results in 404
- Force unique page slugs across all post types
- Getting Post ID from slug during init
- Custom Slug for a custom post type and default post
- Remove taxonomy slug when not assigning taxonomy with custom post types
- Custom post type’s slug gets wrong when adding a custom meta box
- Rewrite CPT slug with two taxonomy slug instead of one
- Get slug to point to different content of the same post
- WP query by custom post type slug/name
- Can’t edit Custom Post Type slug/permalink
- Remove Taxonomy Slug when No Taxonomy is Assigned to Custom Post Type?
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- Custom Taxonomy breaking pages permalinks
- Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure
- Custom post type with slug for plural (archive) and for single
- Rewrite rules for custom post type slug
- Automaticly add slug to posts
- Remove base slug in permalinks of hierarchical custom post type
- Make slug as ID Number for custom post types
- How do I fix permalinks for custom post types that has the same slug as a page?
- How to remove slugs from multiple custom post types
- Custom post type and taxonomy slug issue
- Custom post types archive redirect
- Does WordPress limit the length of slug names for Post Meta or Terms?
- Why does wordpress keep adding postname to my CPT’s permalink in the end?
- Wrong generated page_name/slug on first publish of custom post type
- Remove post type slug of all post types from permalinks
- Stop / prevent WordPress from updating permalinks of custom post type
- Append date to custom post type url slug
- CPT custom archive template does not get loaded
- Am I using the flush_rewrite_rules function in the right place?
- Rewrite slug for CPT
- Is there a way to have custom post type and page with the same slug?
- Change custom post type slug from plugin options
- Using Same Slug With Multiple Post Types
- Rewrite post type slug only for child theme
- modrewrite not working on my Apache setup
- Child post with numeric only slug keeps redirecting to parent
- How to add a post slug to a url?
- Adding Post id to the end of slug in a Custom Post Type
- Remove the parent slug in a CPT URL
- Permalink for a custom post type isn’t working and I don’t know why
- How to target a specific custom post type post and its all children and grandchildren?
- Custom rewrite url category
- Index page with the same id as the slug
- How can I make the slug of the taxonomy also the slug of the custom post
- Assign same parrent Page to pages AND custom post types
- Allow duplicate slugs for custom post type with taxonomies
- Nested Custom Post Type or Custom Post Type Parents?
- Programmatically rewriting slug through functions.php but returns 404
- Create a custom php page and load it at a specific slug
- Custom Post Type with Same Page URL
- How to prevent a CPT’s slug and page slug from conflicting with each other?
- Custom Post Slug same as Parents Category Slug
- Multiple (two) category postings on the same page.
- Removed custom post type slug but not working for child pages
- Including taxonomy term before post type breaks top level pages
- Can slugs from posts and custom post types conflict?
- Custom Post Type – Duplicate Page Slugs
- Some posts from custom post type to subdomains
- Remove permalink for custom post type
- Auto Slug Generation for Custom Post type
- How to make a posttype show under a page hierarchy (example.com/page/posttype/entry)?
- Custom Post Type archive-{post-type}.php not working
- Custom post type single page (single-{CPT-name}) 404 when slug includes hyphens
- How do you create %post_type%/%postname%/ permalink structure?
- Slug for custom post type
- Rename a slug label
- Slug Confusion Between Post and Custom Post types?
- How to find a specific post_type using its “rewrite slug”?
- Different slug taxonomy for two different CPT
- How to add current custom taxonomy slug to body class