You can do this by setting 'with_front' => false
while registering the new custom post type, To remove the custom post type slug which WordPress adds by default, pass 'slug'=>''
empty.
E.g.
//Example - how to pass array to rewrite
$args = array(
// This rewrite settings will remove the slug you want also the slug - /custom_post_type/
'rewrite' => array('slug'=>'','with_front'=>false),
);
register_post_type('custom_post_type',$args);
Reference – Register_post_type()
Related Posts:
- Remove slug from custom post type post URLs
- Add extra parameters after permalink?
- Change permalinks for posts but not for custom post types
- Custom Post type & Taxonomy URL structure
- Slug Formatting : Acceptable Characters?
- Disable permalink on custom post type
- Combining Multiple Taxonomies in one URL
- Change slug of registered custom post type in child theme
- Dynamic taxonomy in permalink made all other posts NOT FOUND?
- How to achieve this permalink -> category-name/custom-post-type-name/post-name
- Prepend meta_value to permalink of post
- Custom permalinks – post type – hierarchical taxonomy’s
- Remove Slug from Custom Post Type results in 404
- Remove taxonomy slug when not assigning taxonomy with custom post types
- Add extra parameters after permalink?
- 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
- How do I fix permalinks for custom post types that has the same slug as a page?
- 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
- Child post with numeric only slug keeps redirecting to parent
- Permalink for a custom post type isn’t working and I don’t know why
- Add custom post type settings to wordress default posts
- Assign same parrent Page to pages AND custom post types
- Create a custom php page and load it at a specific slug
- Custom Post Slug same as Parents Category Slug
- Custom Post Type – Duplicate Page Slugs
- Remove permalink for custom post type
- Permalink misbehaving in Custom Post Types
- Check post on publish for blank title
- How do you create %post_type%/%postname%/ permalink structure?
- How to implement a different permalink structure for custom post type?
- Custom Post Type Advanced Slug
- Automatically update slug with latest title within custom post type [duplicate]
- Custom Post Type to replace Woocommerce products – page not found error
- Need to return a string as permalink insted of str_replace
- How to controll the Posts post type and general wondering about WP data structure
- Under What Conditions Can I name my CPT the same as my CPT Page?
- How to setup different permlalinks for posts and pages?
- Adding /blog in front of single posts (only)
- How to mass get post editor URLs
- add all blog posts to folder
- Permalink for specific post type
- News post with multiple permalinks? When opened from different page
- Change permalink incrementor into pseudo-subdirectory
- Custom post type URL structure with site.com/custom_taxonomy_slug/post_name
- Two CPT: one is using part of the custom rewrite slug from the other
- WordPress page not showing up – replaced with last 10 posts?
- Custom permalink rewrite rules – how do I fix this?
- Creating custom post type relationships
- Links Image in “Catalog” Page to Posts
- Problem to get the link of the default ‘post’ post type like the orther custom types
- Can I override the permalink/slug on creation
- Get full control over custom post type url
- Add category slug as class attribute in a link array
- Remove Custom Taxonomy Slug only without removing Custom post type slug in permalinks
- Can’t make permalink of CPT work
- Custom Post Type permalink not working on new posts
- How to make nested custom post type slugs work
- Change permalinks for posts but not custom post type?
- Wp-theme Development
- How to get permalink of post based on post name?
- Hide custom post type slug url from search engine [closed]
- Custom post type Premalinks main page and details page
- How to change permalink structure off default posts and also CPT’s posts
- How to get taxonomy category in permalink for each taxonomy OR How to give a parent page to a given taxonomy?
- button onclick with get_post_permalink
- Append date to custom post type url slug
- Show the same Article Available in Other Categories
- Getting posts under the custom post type ui category
- Add archive slug to default post post type
- Custom Post type and permalink settings
- Storing posts from query and accessing later via AJAX call
- If post has custom field then display css-class
- Custom rewrite rule for hierarchical custom post type
- CPT custom archive template does not get loaded
- Am I using the flush_rewrite_rules function in the right place?
- Display only one post each WEEK
- Rewrite slug for CPT
- Tag Archive for Custom-Post-Type Posts yielding 404 when permalinks set to postname
- List children on child post
- Restrict custom post type from appearing with ?post_types=
- Is there a way to have custom post type and page with the same slug?
- Change custom post type slug from plugin options
- Show custom post type filtered by category
- add category name to permalinks on product page /category-name/product-name
- create parent post using wp_insert_post
- Turn on and off custom post type from admin?
- Use menus with anchors
- Missing Posts in Custom Taxonomy List
- Custom Post Type permalink shows wrong page: homepage/index.php
- Get term name and term parent into custom post type permalink
- Display random posts, but omit the post it is on?
- WordPress add_permastruct unwanted matches
- Rewrite rules for custom posts types