• Resolved mitch8910

    (@mitch8910)


    I have a custom post type “review_page”.

    Everything thing I have tried has seemed to work for newly created pages, but just makes my current pages 404. I am also creating pages via Rest API and the slug removal doesn’t work for them either.

    I have tried this code. I am using the CPT UI plugin and have set the “slug override” there to “/” which works like mention above, only new pages not creating with API.

    My link structure is:

    https://www.swarmreviews.com/sample-post/
    Can anyone offer any guidance, please?

    @tw2113 I can see you have helped with this in the past?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I honestly don’t have a lot of experience in regards to potential challenges and nuances with creating content in post types via the REST API, so I don’t know what’s going on there.

    I really dislike the / for a slug replacement because in my mind it’s hotwiring the permalink structure, and sadly it at least sometimes seems to work.

    I know I borrowed and adapted content from various places to post https://michaelbox.net/2020/06/slugless-post-type-permalinks/ a couple years back, which talks about this topic without the / rewrite slug setting, but as the comments on the post will show, there’s still some other challenges that I don’t presently have answers for.

    One question I always have when people want to remove post type slugs from their permalinks is why, as it presents important information really. But I don’t question that there may be valid reasons that I haven’t thought of yet.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Any news or changes on this front @mitch8910 ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I can’t Remove Custom Post Type Slugs from my Permalinks?’ is closed to new replies.