[wp-trac] [WordPress Trac] #43593: Permalink setting of /%postname%/ appends -2 to all posts without titles
WordPress Trac
noreply at wordpress.org
Wed Mar 21 07:53:22 UTC 2018
#43593: Permalink setting of /%postname%/ appends -2 to all posts without titles
--------------------------+-----------------------------
Reporter: micasuh | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Permalinks | Version: 4.9.5
Severity: normal | Resolution: invalid
Keywords: | Focuses: administration
--------------------------+-----------------------------
Changes (by dd32):
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
This is intentional, as WordPress does not support numeric slugs.
Appending `-2` transforms the numeric post_id of `123` into a string of
`123-2`.
See #5305 for where that was introduced.
If you want titleless posts to have a different slug, you should be able
to use the
[https://developer.wordpress.org/reference/hooks/wp_unique_post_slug/
wp_unique_post_slug] filter to change numeric-slugs to something else.
I'm marking this as `invalid` due to the behaviour being intentional, and
WordPress's inability to support numeric slugs at present.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43593#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list