• Hi

    I have the permalink for my custom post type set to
    /%post_id%/%postname%/

    I believe this format works well for me in making it easy to read the url, but also for seo.

    However, I’ve noticed that if I type just the ID in the url, it 404.

    Is it possible for me to do
    mydomain.com/cpt/%post_id%/%postname%/

    but still go to the correct page if someone just types in
    mydomain.com/cpt/%post_id%

    For example: mydomain.com/flowers/22/ would still go to the page for mydomain.com/flowers/22/dandelion

    https://ww.wp.xz.cn/plugins/custom-post-type-permalinks/

The topic ‘Falling back on post id’ is closed to new replies.