How to Change Custom Post Type Permalinks in WordPress

Custom post types use their own URL structures. By default, a URL typically consists of a post type base and an individual post slug. For example, a book item might use the URL /book/2001-a-space-odyssey/.

WordPress lets you edit the slug for individual posts, but you cannot fully customize custom post type permalink structures through the standard permalink settings.

In this guide, you'll learn how to customize custom post type URLs, edit individual post slugs, change post type archive URLs, and remove the default post type base. You'll also learn how Permalink Manager extends WordPress's built-in permalink options.

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:
    The shared URL base for individual items, such as book or product.
  2. The Post Slug:
    The unique part that identifies an individual item, such as 2001-a-space-odyssey.

Single CPT permalink exampleUse a distinct rewrite slug for each content type so WordPress can match URLs to the correct content. For example, both of the URLs below use the slug dune, but each has a different rewrite slug (book or movies).

https://example.com/book/dune/
https://example.com/movies/dune/

This allows WordPress to distinguish between the two content types, even when their items share the same title, and prevents URL conflicts and 404 errors.

In addition to individual post URLs, WordPress can create an archive page for a custom post type if you register a custom post type with archive support enabled. This page has its own URL, which can use a different rewrite slug from individual post URLs, e.g:

You can change it by configuring the has_archive when registering the custom post type. For example, individual books could use URLs such as:

https://example.com/book/2010-a-space-odyssey/

while the archive listing all books could be available at:

https://example.com/publications/

How to Adjust Permalink Format for Custom Post Type Without a Plugin?

The method depends on which part of the URL you want to change. You can edit an individual post slug in the WordPress editor, change the shared rewrite base, or set an archive slug in the plugin or code used to register the post type.

If needed, you can also override the custom post type's permalink rewrite settings with code.

How to Change the Slug of an Individual Custom Post

You can change the slug for each individual post directly from the WordPress admin dashboard. The most convenient option is to change it directly in the post editor, where you manage the title and content.

For example, if you change the slug from anna-nowak to anna-kowalska-nowak, the post URL becomes:

https://example.com/team/anna-kowalska-nowak/

The change applies only to that post and does not affect other URLs of the same custom post type.

Rewrite slug as a URL base

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.

How to Change Rewrite Slug (Base)?

Unlike standard posts, custom post types do not have their own permalink settings in the WordPress admin dashboard. By default, WordPress uses the custom post type's rewrite slug as the URL base. For example:

https://example.com/book/childhoods-end/

If you want to use a different URL structure, you can change the rewrite slug when registering the post type. For example, changing the rewrite slug from novel to publication changes the URLs of all items belonging to that post type, e.g.:

https://example.com/novel/childhoods-end/

To change the rewrite base in code, set a different slug value in the rewrite argument of the register_post_type() function:

function pm_cpt_registration() {
	$args = array(
		'public' => true,
		'label' => 'Book',
		'supports' => array( 'title', 'editor', 'thumbnail' ),
		'rewrite' => array( 'slug' => 'novel' ) // Change the slug here
	);

	register_post_type( 'book', $args );
}
add_action( 'init', 'pm_cpt_registration' );

You can also overwrite it using the register_post_type_args filter:

function pm_change_cpt_slug( $args, $post_type ) {
	if ( $post_type === 'book' ) {
		$args['rewrite']['slug'] = 'novel'; // Change the slug here
	}

	return $args;
}
add_filter( 'register_post_type_args', 'pm_change_cpt_slug', 10, 2 );
After updating the rewrite slug, go to Settings → Permalinks and click "Save Changes" to flush rewrite rules.

How to Change the Custom Post Type Archive URL

You can customize a custom post type's archive URL in much the same way as its rewrite slug. When registering the post type, use the has_archive argument to enable the archive and define its URL slug.

By default, WordPress uses the post type's rewrite slug for its archive URL. For example, if the rewrite slug is vehicle, the archive URL is:

https://example.com/vehicle/

To use a different archive URL, set has_archive to a custom slug, such as car. This changes the archive URL to:

https://example.com/car/

You can set the archive slug in the arguments passed to the register_post_type() function:

function pm_cpt_vehicle_registration() {
	$args = array(
		'public' => true,
		'label' => 'Vehicle',
		'supports' => array( 'title', 'editor', 'thumbnail' ),
		'has_archive' => 'car' // Change the slug here
	);

	register_post_type( 'vehicle', $args );
}
add_action( 'init', 'pm_cpt_vehicle_registration' );

You can also change the archive slug using the register_post_type_args filter, just as you would override a custom post type's rewrite slug.

function pm_change_cpt_vehicle_slug( $args, $post_type ) {
	if ( $post_type === 'book' ) {
		$args['has_archive'] = 'car'; // Change the slug here
	}

	return $args;
}
add_filter( 'register_post_type_args', 'pm_change_cpt_vehicle_slug', 10, 2 );

WordPress's built-in permalink settings cover posts, categories, and tags, but they offer limited control over other content types.

Permalink Manager extends these settings, giving you more control over permalink structures for custom post types, taxonomies, and individual URLs.

For more information, see our guide to custom permalinks in WordPress.

Allowing Duplicate Slugs

WordPress adds -2 to a slug when another post of the same post type or another term in the same taxonomy already uses it. For hierarchical taxonomies, WordPress combines the parent term's slug with the child term's slug.

For example, a term named Red under Shirts gets the slug red-shirts. This can be problematic on multilingual websites, in hierarchical permalink structures, or in setups where identical titles exist under different parent URLs.

Permalink Manager checks the entire custom permalink, not just the slug. You can duplicate slugs for multiple items as long as their full URLs are different.

Example URLs with duplicated slugs

Removing the Custom Post Type Slug (Base)

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.

URL base removed from CPT permalink

Adding Taxonomy Slugs 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

Editing Individual URLs

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 opened on "Edit post" page

FAQ

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

If you change the rewrite slug for a custom post type or edit the permalink of an individual post, the previous URL may stop working unless you set up a redirect.

Many permalink plugins, including Permalink Manager, can redirect old URLs automatically to help prevent broken links and preserve 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.

Can I Change the Archive URL Without Changing Individual Post URLs?

Yes. You can customize the post type archive URL in code by setting the has_archive argument when registering the post type. Some plugins, including ACF, Pods, and Toolset, allow to configure the archive slug directly in the admin dashboard.

Last updated on October 18, 2026 by Maciej Bis.

Categories: Plugins, SEO, Tutorials, WordPress core

Leave a Reply

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