Allow duplicate slugs for different content
|Reported by:||maorb||Owned by:||wonderboymusic|
Currently, the slug of a post (or any other CPT) must be unique.
If a content is being created and an already existing slug is being assigned to it - WP will add a number for identification (i.e. about-2 etc).
That means, that if one has content from different content types, or in different categories (taxonomies), it still cannot have same slug.
The issue might be very disturbing when working in a multi lingual site (i.e using WPML or any other plugin for that).
Suppose there is an about page - www.mysite.com/about.
This is in the main language of the site.
Than a translation to that content page is being added, let's say it is translation to English.
You would expect url something like www.mysite.com/en/about, but the slug is being changed to about-2, so the url of the about page in English becomes www.mysite.com/en/about-2.
For a site with 10 languages, let's say, it will end with urls like site.com/lang/about-10 etc.. and this is not looking good and may confuse.
As a cms, WP should let the admin/developer/operator - to have same slugs for different content types, or even in the same content type. The $post->ID is the unique identifier of a content, why should be also the slug?
Change History (53)
comment:21 @helen — 12 months ago
- Keywords has-patch needs-testing added
- Milestone changed from 3.9 to Awaiting Review
comment:25 in reply to: ↑ 24 @xusht — 11 months ago
comment:28 @jpswade — 7 months ago
- Keywords needs-unit-tests removed
- Severity changed from normal to major
- Type changed from enhancement to defect (bug)
- Version set to trunk
comment:32 in reply to: ↑ 14 @nacin — 6 months ago
- Component changed from Rewrite Rules to Permalinks
- Keywords commit has-unit-tests added; needs-testing removed
- Milestone changed from Future Release to 4.1
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
comment:40 follow-up: ↓ 45 @dd32 — 4 months ago
- Resolution fixed deleted
- Status changed from closed to reopened