By default, custom post type URLs contain only the post type base and the post slug, for example, /sales/john-doe/.
Including a taxonomy term in the URL, as in /sales/europe/switzerland/john-doe/, usually requires additional rewrite rules, which can conflict with existing rules and cause 404 errors. If you are changing existing permalinks, you also need to set up redirects from the old URLs.
Permalink Manager supports this natively. You can include one or more taxonomy slugs in your permalink structure under Tools → Permalink Manager → Permastructures, without writing or implementing custom code.

Adding Taxonomies to Custom Post Type Permalinks
Depending on your content structure, you can use a single custom taxonomy or combine several taxonomies to create hierarchical, more descriptive URLs. This works much like adding categories to the URLs of standard posts.
For example, to include both the Fuel and Manufacturer taxonomies in the URLs of the Cars post type, set its permalink structure to:
%fuel%/%manufacturer%/%car%A car assigned to the Diesel and Ford terms will then have the following URL:
https://example.com/diesel/ford/ford-fiesta/Step 1: Configure Permastructure Settings
To add taxonomy tags to a custom post type's permalink structure, open Tools → Permalink Manager → Permastructures.
Find the custom post type you want to modify, then enter the taxonomy tags directly into its input field. Wrap each taxonomy name in percent signs, for example, %fuel% or %manufacturer%.
To view all available permastructure tags for your taxonomies, click the "Available tags" button below the input field.

Step 2: Applying Changes to Existing Permalinks
The new format applies only to newly published posts. Saving a new permastructure does not update existing URLs automatically
This is intentional. It helps prevent unexpected changes to URLs that search engines have already indexed or that other websites link to.
If you want to keep your existing URLs unchanged, you do not need to do anything else. To apply the new format to existing posts as well, use the Regenerate/reset tool.
What happens to the old URLs after you regenerate them?
- If a post previously used the default WordPress permalink, the plugin automatically redirects it to the new URL. This also works in the free version of Permalink Manager.
- If the old URL was a custom permalink, the redirect works only if you enable both Extra redirects (aliases) and Save old custom permalinks as extra redirects in the plugin settings. Both options require Permalink Manager Pro.

How Permalink Manager Chooses the Taxonomy Term?
The plugin supports both hierarchical and non-hierarchical taxonomies in custom post type permalink structures. By default, it adds taxonomy slugs to custom post type URLs, similar to how WordPress can include category slugs in post URLs.
Most ready code snippets skip parent slugs when a taxonomy has a parent-child structure. Permalink Manager plugin supports this out-of-box. For hierarchical taxonomies, it automatically uses the lowest-level term and adds all parent slugs to the URL.
For example, if a product belongs to "Clothing → T-Shirts → Cotton", the permalink will contain all category (taxonomy) slugs:
http://example.com/%product_cat%/%product%
http://example.com/clothing/t-shirts/cotton/happy-ninja
http://example.com/clothing/jackets/leather/biker-black
The plugin allows you to set a different term for the CPT permalink. If you select a primary category, its slug will be used in the URL instead.
If you want shorter URLs and do not want all parent slugs included, you can use alternative taxonomy tags. You can choose to include only the highest level term slug or only the deepest one in the custom post type permalink.
How to Use the Highest-Level Taxonomy (Category) Slug?
To display only the highest-level parent term, append "_top" to your taxonomy tag.
For example, replace %product_cat% with %product_cat_top%.
http://example.com/%product_cat_top%/%product%
http://example.com/clothing/happy-ninja
http://example.com/clothing/biker-black
How to Use the Lowest-Level Taxonomy (Category) Slug?
To display only the deepest child term, append "_flat" to your taxonomy tag.
For example, replace %product_cat% with %product_cat_flat%.
http://example.com/%product_cat_flat%/%product%
http://example.com/cotton/happy-ninja
http://example.com/leather/biker-black

Primary Category Support
If you use an SEO plugin that lets you select a primary category (term), Permalink Manager automatically includes its slug in the default permalink.
Supported plugins include Yoast SEO, Rank Math, The SEO Framework, SEOPress, SmartCrawl, and All in One SEO Pro.
Example 1: Top-Level Primary Category Selected
If a top-level category such as "Sales" is set as the Primary Category, the custom permalink will contain only that term’s slug. Even if the post is also assigned to subcategories: "Europe" or "Switzerland", those terms will not be added to the custom permalink.

Example 2: Lowest-Level Primary Category Selected
If you choose a lowest-level term, such as "Switzerland" as the Primary Category, Permalink Manager will add the slugs of all its parent terms to the custom permalink.
This will also happen if no primary term is selected or if primary category support is disabled. In those cases, the plugin will use the lowest-level assigned term and its parents by default.

How to Disable “Primary Category” Support?
If necessary, you can turn off "Primary category" support in the plugin settings. Once disabled, the plugin will generate custom permalinks using the lowest category in the hierarchy, including its parent categories (when available).

You can also turn it off with code:
add_filter( 'permalink_manager_primary_term', '__return_false' );
Advanced Customization & Developer Tips
How to Modify the Term Slug Programmatically
For advanced permalink customization, you can override the category slug used in the default custom permalink and modify it dynamically with custom code.
permalink_manager_filter_term_slug($slug, $selected_term, $post, $all_terms, $taxonomy)
| Variable | Description |
|---|---|
| $slug | The slug or slugs trail used to replace %taxonomy% tag (eg. %category%) in default post permalinks (string) Example input: europe/central-europe/slovakia |
| $selected_term | Term object chosen to be used in the default permalink of a post (WP_Term) |
| $post | The post object for which the default permalink is generated (WP_Post) |
| $all_terms | Array of all terms that are linked to the post that the default URL is generated for (WP_Term[]) |
| $taxonomy | The name of the taxonomy (string) Example input: category |
Adding Multiple Top-Parent Categories
The example below shows how to use this feature to add the slugs of two top‑level categories to a single post permalink.
How to Auto-Update Permalink After Taxonomy Changes?
If no dedicated action hooks are available, you can also force Permalink Manager to regenerate the custom permalink after a category or taxonomy has been set using built-in set_object_terms hook.
The example below applies to WooCommerce products (with product categories), but you can modify the $taxonomy variable to apply it to other post types and taxonomies.
Many plugins provide their own action hooks that are called after posts are created. For example, if you use Permalink Manager with Dokan, you can configure the plugin to generate a custom permalink after the dokan_new_product_added hook is called:
FAQ & Troubleshooting
Will Adding Category Slugs to Permalinks Break Existing Links?
No. Existing URLs remain unchanged until you regenerate them. Only new posts use the new URL format.
If you regenerate existing URLs, the plugin can automatically redirect the old URLs to the new ones with taxonomy slugs.
Why Are My Post URLs Missing the Category Slug?
If you see that new post URLs are missing the category, and a third‑party import or sync plugin is active, the plugin is probably saving the post too early (before it assigns the category). This is common in job board, directory, product sync, and bulk import plugins.
These plugins often change the way WordPress normally saves and publishes posts. Instead of completing the process in a single call, they split it into two steps:
- Firstly, they create the empty post using wp_insert_post() function, usually with only the title and content.
- Once the post has been saved and its custom permalink generated, they assign taxonomies, such as categories, and add metadata.
The same issue can occur when you create a post manually in the WordPress admin dashboard and publish it before assigning its categories.
Because the categories are not assigned until the second step, Permalink Manager cannot include them when it initially generates the custom permalink. This can result in incomplete URLs.
To fix this, you can add custom code to regenerate the permalink after the taxonomy terms have been assigned.
Is This Feature Available in the Free Version?
No, this feature is included in the free version as well. If you want to add custom taxonomy slugs to your custom post type permalinks, you do not need a Pro license.
You need Permalink Manager Pro if you want to change the URLs of custom taxonomy archives or use custom fields in your permalink structures.

