In general, using the same permalink format for multiple content types in WordPress is not possible. This might be a major issue, particularly if you want to apply the silo schema to your permalink structure. You can easily solve this issue using Permalink Manager, regardless of how you want your permalinks to be structured.
Some of the functionalities presented in this article are not available in free version (Permalink Manager Lite). Buy Permalink Manager Pro
At first look, the idea of original permalink bases and rewrite rules may seem confusing. To begin, WordPress uses predefined, simplified formats to identify the content type from requested URL address, hence reducing the number of database requests. If they are not unique for each content type, WordPress will be unable to detect URL and load a proper post or term.
In other words, when a visitor attempts to access a page, WordPress compares the requested URL to an array of rewrite rules, which is actually a set of permalink format patterns. If the requested permalink matches any of these, WP will convert the URI into a database query, load the appropriate template file, and deliver the page or return a “not found” error.
Why does the WordPress permalink system need unique rewrite bases?
One issue that emerges here is that certain rewrite rules (permalink formats) take precedence over others. Furthermore, when WordPress reads the URL, it does not care whether the post, page, or term exists; it simply has to match the permalink format with possibly the greatest priority.
Take a look at the example below. If you use the same rewrite slug for both products and product categories permalinks, WordPress will treat any URLs starting with “/shop/” as product category permalinks. As a result, whenever a visitor accesses any product page, WordPress will attempt to load a product-category page that does not exist.
“Product category” permalinks (WordPress detects them correctly)
“Product” permalinks (WordPress sees them as product categories and returns 404)
How to duplicate permalink format in Permalink Manager?
To cut a long tale short, Permalink Manager allows you to set the same rewrite base/slug for different content types since it does not use rewrite rules (regular expressions) to detect the content. To be specific, it identifies posts and terms based on their complete custom permalinks rather than their slugs. The plugin can easily detect them as long as you keep the permalinks unique as a whole.
Below is a basic case study, but you may take it as an example and mimic it in any more sophisticated permalink structure. We have one custom content type and two taxonomies (one hierarchical and one non-hierarchical) available, as shown below. For each content type, the rewrite slug (“car“, “manufacturer“, “transmission“) parameter is unique.
Our objective is to apply the same base (“cars”) for the permalink of all three content types:
As previously said, you can use Permalink Manager to make multiple post types and taxonomies use the same permalink structure based on your needs. Following the steps outlined below should make it simple to make advantage of this feature.
Before we get started, keep in mind that this is a very basic example that will just give you an idea of how this functionality may be used. The first step is to change the permastructure settings. To do so, go to the admin section “Tools -> Permalink Manager -> Permastructures”. You may simply modify the permastructures of all custom post types and taxonomies as shown below.
cars/%car% → cars/%manufacturer%/car%
manufacturer/%manufacturer% → cars/%manufacturer%
transmission/%transmisson% → cars/%transmission%
Above, you can see Permastructures’ settings page. To apply the same permalink structure, simply edit each of the fields displayed analogously to the configuration shown below.
Please remember to save your changes after adjusting the settings by clicking the “Save Permastructures” button at the bottom.
Apply the new settings to existing URLs
After you configure the permalink formats with new bases, Permalink Manager will use them in all new post and term permalinks. You will need to regenerate their permalinks if you want to update them in old elements as well.