• Hi,

    so i created a new post type called Product, and disable slug rewrite.

    on wordpress setting, the permanent link structure is set to the basic one, http://www.mysite.com/p?=123 (well i tried others as well)

    on my default ‘post’ type, when i create a new post, the url follow the permanent link structure above. that is correct.

    but on my custom post type – Product, after post is saved, the url got rewrite to http://www.mysite.com/product?=This_is_slug

    how can i make our custom post type to use post id instead of slug in the url?
    Thanks.

Viewing 1 replies (of 1 total)
  • Anonymous User 14808221

    (@anonymized-14808221)

    You are right, Custom Post Types will use the Slug, while Posts and Pages use the ID, if the permalink is set to “Plain”.

    This is not any different from Custom Post Types that you register manually.
    You can try with this tool:
    https://generatewp.com/post-type/

    When you add such a post type the URL will behave the same as a Custom Post Type URL created by Types.

    These seem to be WordPress restrictions.

Viewing 1 replies (of 1 total)

The topic ‘url issue’ is closed to new replies.