How to Change Custom Post Type (CPT) Permalinks in WordPress

Custom post types use their own permalink structures, typically consisting of a rewrite slug and a post slug.

WordPress lets you edit the slug for individual posts, but it cannot customize permalink structures for custom post types from the standard permalink settings.

Permalink Manager extends these settings by allowing custom permalink structures, taxonomy placeholders, custom fields, duplicate slugs, and per-item URL overrides.

How WordPress Generates Custom Post Type URLs

Every custom post type registered in WordPress has its own permalink structure. This structure usually includes two parts: the rewrite slug and the item slug.

  1. the rewrite slug (URL base)
  2. the individual post slug

Single CPT permalink example

URL Part Purpose
book Identifies the custom post type
2001-a-space-odyssey Identifies the individual post

The rewrite slug must be unique because WordPress uses it when matching URLs against its rewrite rules. After WordPress identifies the content type from the rewrite slug, it loads the correct post using the item slug.

This separation allows different content types to use similar post titles without URL conflicts and 404 errors. For example:

Same slug, different post types

Although both posts use the same title ("Dune"), the rewrite slug ("book" or "movie") determines which type of content WordPress loads.

Why Custom Post Types Exist?

Most WordPress sites work with two main content types: pages and posts. When your content does not fit into them, you can create custom content types to keep it separate. Custom post types allow developers and website owners to create dedicated content structures with their own:

  • meta fields
  • templates
  • taxonomies
  • user permissions
  • permalink rules

Common examples include:

Plugin or Website Custom Post Type
WooCommerce Products
Event plugins Events
LMS plugins Courses
Portfolio themes Projects
Job boards Jobs
Directory plugins Listings

Because these content types serve different purposes, they often require different permalink structures as well.

How to Change Permalink Structure for Custom Post Type Without a Plugin?

In general, you can change the individual slug for any single custom post directly in the admin dashboard. If you want to modify the permalink structure for all posts in a custom post type, you must use a code snippet or install a dedicated permalink plugin, such as Permalink Manager.

How to Change Rewrite Slug (Base)?

The permalink structure is not managed through the standard WordPress permalink functions. By default, WordPress sets the rewrite slug to the same value as your custom post type name.

If you need a different permalink structure, you can adjust the it during post type registration. The process differs depending on whether the post type was registered in code or via a plugin like ACF, Toolset, or Pods.

After updating the rewrite slug, go to "Settings -> Permalinks" and click "Save Changes" to flush rewrite rules.

Using register_post_type() function

When registering a custom post type, you can set a different permalink slug than the post type name. To do so, set a different " slug " in the " rewrite " parameter when calling register_post_type() function.

In the example below, the original post type name "book" is changed to "publication".

function custom_post_type_registration() {
	 $args = array(
		 'public' => true,
		 'label' => 'Book',
		 'supports' => array('title', 'editor', 'thumbnail'),
		 'rewrite' => array('slug' => 'publication'),
	 );
	 register_post_type('book', $args);
}
add_action('init', 'custom_post_type_registration');

How to Change Slugs For CPT Items

You can change the slug for each individual post directly from the WordPress admin dashboard. In the example below, the input field (with "anna-nowak") lets you quickly edit the slug for that specific item.

The rewrite base ("team") cannot be edited here, as it applies to all posts within this custom post type. Since it is managed as a global setting, WordPress does not allow to edit it inside the post editor. For that reason, it is shown as static text.

Rewrite slug as a URL base

Common Custom Post Type Permalink Issues

A frequent question is why it is so hard to remove a CPT slug from the permalink structure, for example changing /product/iphone/ to just /iphone/ . The reason is how the permalink rewrite mechanism in WordPress core works.

Why You Can't Just Remove the CPT Base?

Each custom post type and taxonomy has its own rewrite rules stored in the rewrite table. WordPress checks this table on every page load and stops at the first rule that matches the URL.

If two post types use a similar permalink structure, or if you remove the rewrite slug (CPT base) to use a root-level URLs like pages, URL conflicts are inevitable.

In most cases, this results in 404 errors for either your custom post type items or regular pages.

The Forced Unique Slug Problem

When you publish a post, the slug is created from the post title. WordPress then checks the database using the wp_unique_post_slug() function to make sure the slug is unique.

If the same slug already exists in the database, even for a different post type, WordPress adds a number like "-2" or "-3". This happens because without unique slugs, the rewrite system may not link the URL to the correct post.

The built-in permalinks in WordPress are limited to basic structures. Using a plugin or a extra code snippet, you can remove default rewrite bases, add category names, or standardize URLs across post types.

For a detailed guide on how to set up and use custom permalinks to organize your site’s URLs, see our full article about custom permalinks.

Allowing Duplicate Slugs

By default, WordPress does not allow two posts to use the same slug. This rule applies even if the posts belong to different post types or taxonomies. When a duplicate slug is detected, WordPress automatically adds a number such as "-2" to the URL.

This can be problematic on multilingual websites, in hierarchical permalink structures, or in setups where identical titles exist under different parent URLs.

Permalink Manager removes this restriction and lets you use duplicate slugs where it actually makes sense.

Example URLs with duplicated slugs

WordPress automatically includes the post type name (slug) in your URLs. This makes the permalink structure longer and repetitive.

There is no built-in option in the WordPress settings to remove those bases. Removing it manually through custom code may break rewrite rules and lead to URL conflicts and 404 errors.

With Permalink Manager, you can remove the post type slugs (bases) safely directly in the admin panel, without writing a single line of code.

Adding Taxonomy to Custom Post Type URLs

Standard WordPress settings do not support adding taxonomy slugs to custom post type URLs. Permalink Manager fills that gap.

Once set up, it lets you include any taxonomy term in your URL structure and the plugin handles the rest automatically. This creates logical, hierarchical URLs that reflect content relationships.

For websites using Yoast SEO, Rank Math or SEOPress, the plugin also respects the primary category setting, so only the correct term is used in the permalink.

Add category to custom permalinks

Out of the box, WordPress does not allow custom field values to be included in permalink formats.

Permalink Manager makes this possible and it allows custom field values to be added to permalinks automatically.

As a result, you can create structured URLs based on SKU numbers, locations, or other custom metadata. The solution is compatible with ACF, Meta Box, JetEngine, Toolset, Pods, and other plugins and themes that store data using the standard post meta system.

Custom fields permalinks

Individual URL Adjustments

WordPress normally applies one permalink structure to all posts of the same type. That works fine until you need something different for just one post or page.

Permalink Manager adds a dedicated URL field to every post, page, and term in your dashboard. From there, you can change the permalink for any individual item at any time.

This gives you full control over individual permalinks when you need specific URLs for SEO, site migration, or to keep legacy links working.

URI Editor opend on "Edit post" page

FAQ

What Happens to Old URLs After I Change a Custom Post Type Permalink?

If a permalink changes, the previous URL will no longer work unless a redirect is set up. Using a plugin like Permalink Manager ensures that old URLs automatically redirect to the new structure, preventing broken links and loss of traffic.

Can I Change the Permalink Structure for a Custom Post Type?

Yes. Changing the URL format for a custom post type requires either editing the code that registers the post type or using a dedicated plugin such as Permalink Manager. The built-in WordPress settings do not allow to do this directly from the admin dashboard.

How Are Permalinks Generated for Custom Post Types?

By default, WordPress generates a permalink using the post type slug followed by the post title. This structure applies to all items of that post type unless you modify it using custom code or a plugin.

Last updated by Maciej Bis on: June 2, 2026.


Maciej BisFounder of Permalink Manager & WordPress Developer

The developer behind Permalink Manager, a plugin for managing permalinks, has been working with WordPress, creating custom plugins and themes, for more than a decade.

Leave a Reply

Your email address will not be published. Required fields are marked *