WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] permalinks for identical post slugs (8 posts)

  1. gik
    Member
    Posted 7 years ago #

    I have following permalink structure: /%post_id%/%postname%.html
    As i know in this case wordpress could identify article id directly from uri.
    But when I create two post with same name wordpress engine adds numbering to the post slug.
    I need:
    /1234/my-article.html
    /5678/my-article.html
    But I get:
    /1234/my-article.html
    /5678/my-article-2.html

    Is it possible to resolve this feature?

  2. petit
    Member
    Posted 7 years ago #

    Yes.

    One would be to skip the %post_id% part and just use the more informative and search engine friendly %postname%.html.

    I can see your point, that %post_id% identifies a post in a very secure way, but when you use %postname% in your permalink, WordPress has to qualify the post slug with a number, in case you change your mind and want to use only the slug.

  3. Kafkaesqui

    Posted 7 years ago #

    The following plugin should help:

    http://jamietalbot.com/wp-hacks/singular/

  4. vkaryl
    Member
    Posted 7 years ago #

    Kaf, you have to put a space before a link that starts a line in order to make it be a link....

  5. Kafkaesqui

    Posted 7 years ago #

    What, Copy&Paste is too 1998?

  6. vkaryl
    Member
    Posted 7 years ago #

    Apparently.... welcome to the wordpress 21st century.

  7. gik
    Member
    Posted 7 years ago #

    Kaf, thank you for plugin. It's what I need!
    Petit, I have a lot of articles, and only postname in URI can't be solution for my blog.

  8. petit
    Member
    Posted 7 years ago #

    Ahh..
    Happy you found a solution :)

Topic Closed

This topic has been closed to new replies.

About this Topic