WordPress automatically adds a rewrite slug to custom post type and taxonomy URLs. For example, a custom post type named book may use /book/book-title/, while a taxonomy may use /genre/fiction/.
If you want cleaner URLs such as /book-title/ or /fiction/, you need to not only change the permalink structure, but also make sure WordPress can still resolve the shortened URLs correctly.
The rewrite slugs help WordPress distinguish different content types and cannot usually be removed through the standard permalink settings. Removing them usually requires custom code or workarounds that can lead to URL conflicts and 404 errors.
Permalink Manager is a faster and more convenient alternative to writing or generating custom code, especially if your website uses multiple custom post types or taxonomies whose URL bases you want to remove.
How to Remove Custom Post Type and Taxonomy Slugs?
Step 1: Remove the Slug From the Permalink Structure
Permalink Manager lets you remove the slugs without writing or adding any code. You can do this directly in the WordPress admin dashboard under "Tools → Permalink Manager → Permastructures".
The Permastructures screen allows you to configure a custom permalink structure for each post type and taxonomy separately.

To remove a slug, delete the default base from the input field for the custom post type or taxonomy where you do not want to use it.
| Content type | Before | After |
|---|---|---|
| Portfolio items (post type) | portfolio-item/%portfolio-item% |
%portfolio-item% |
| Portfolio categories (taxonomy) | portfolio-category/%portfolio-category% |
%portfolio-category% |
After you save the settings, the removed slug will no longer appear in permalinks generated for new posts or terms, but it does not change existing permalinks. To remove the base from old URLs as well, complete the next step.

Step 2: Apply the New Structure to Existing URLs (Optional)
Unlike most alternative solutions, this plugin lets you choose whether to remove the URL base from all URLs or only from new ones. It also redirects old URLs automatically to help minimize the impact on SEO.
You can apply the new URL structure to existing WordPress URLs at any time using the Regenerate/reset tool.

Alternative: Remove the Slug From Individual URLs
If you only need to remove a slug from a few URLs, you can edit them individually instead of changing the global permalink structure.
To do this, open the post or term editor and locate the Permalink Manager box, delete the slug from the custom permalink field and save the changes.


Why Do I Need a Plugin or Custom Code to Remove the Rewrite Base?
WordPress does not include a built-in setting for removing the rewrite base from custom post type (CPT) or custom taxonomy URLs. The Settings → Permalinks screen lets you change the permalink structure for standard posts, but not for custom content types or taxonomies.
Why an Empty Rewrite Slug Does Not Remove the Base
You can change the rewrite slug in register_post_type() or register_taxonomy(), but leaving it empty will not remove the base. WordPress uses the post type or taxonomy name as a fallback.
A common workaround is to set the rewrite slug to / or .. However, neither approach reliably removes the base, and both can cause problems with other URLs on your site because WordPress uses this setting to generate rewrite rules.
Without a rewrite base, CPT URLs look the same as post and page URLs, so WordPress can no longer tell them apart. For example, a page named Fiction and a genre term with the same name would both have the /fiction/ URL.
WordPress checks its rewrite rules in order and uses the first match. If the wrong rule matches, WordPress may return a 404 error or load a different item with the same slug.
Removing a CPT base requires more than a change to the rewrite argument. WordPress must distinguish between posts, pages, custom post type items, and taxonomy terms when resolving URLs that do not contain the CPT base.
You can do this using the post_type_link and request filters, but your code must also handle URL conflicts, pagination, feeds, and child pages.
How to Prevent URL Conflicts Between Content Types
Permalink Manager Pro lets you remove custom post type and taxonomy slugs without writing any code. It can also prevent URL conflicts when multiple post types or taxonomies use the same slug.
To enable this feature, open Tools → Permalink Manager → Settings → Advanced Settings and turn on Force unique custom permalinks:
Unlike plugins that check for duplicate slugs only within the content type you are editing, Permalink Manager checks custom permalinks across all post types and taxonomies.
If another item already uses the same permalink, the plugin adds a numeric suffix to the new one to prevent a conflict and keep both items accessible.
| Content type | Original URLs | New duplicated URLs (without the setting) |
New URLs (with the setting) |
|---|---|---|---|
| Fiction (page) | https://example.com/fiction |
https://example.com/fiction |
https://example.com/fiction |
| Fiction (genre term) | https://example.com/genre/fiction |
https://example.com/fiction |
https://example.com/fiction-2 |
FAQ
How Do I Remove a Taxonomy Slug from WordPress URLs?
If you want to remove a taxonomy slug in WordPress, please follow the same instructions as for custom post type permalinks.
Permalink Manager handles custom post types and taxonomies as separate content types, each with its own Permastructure setting. This means you can strip the rewrite base from a taxonomy URL without affecting your CPT URLs, and the other way around.
What Content Types Does Permalink Manager Support?
Permalink Manager supports built-in WordPress post types and taxonomies including posts and pages, categories and tags. The plugin also fully supports custom post types and custom taxonomies controlled by 3rd party themes or plugins.
This includes custom post types and taxonomies declared with popular WordPress plugins such as Advanced Custom Fields (ACF), Toolset, JetEngine, and many others. The plugin can also remove /product/ and /product-category/ from WooCommerce URLs.
Permalink Manager automatically detects all registered content types that have public permalinks enabled. You can then edit their permalink formats in Permastructures settings or customize individual permalinks separately.
Will Removing Post Type and Taxonomy Slugs Affect SEO?
Google recommends using clear and understandable URLs. One way to do this is to remove slugs from custom post type and taxonomy URLs.
This is fine for a new website that has not been indexed yet and has no existing backlinks. For an established website, however, you should not change existing URLs just for this reason.
Removing the slug makes URLs shorter, but URL length is not a meaningful ranking factor, and /book/title/ is already a clear URL
If you change already indexed URLs without setting up the redirects, visitors may encounter broken links and search engines may need some time to reindex the affected pages. Keeping existing URLs unchanged is usually the safest approach.
Permalink Manager uses a granular approach to prevent unwanted URL changes. New settings apply to new posts and terms, while existing content keeps its current URLs until you explicitly use the "Regenerate/reset" tool.
The plugin also automatically redirects old URLs to the new ones, so visitors are sent from the original permalink to its updated version instead of seeing a 404 error.

