Setting ‘With Front’ to False Does Not Work
-
I have an existing custom post type on a site and have a request to remove the slug, so for example ‘somesite.org/ebook/ebooktitle’ to ‘somesite.org/ebooktitle’. I’ve set the ‘With Front’ option in CPT UI to False and then resaved the Permalinks however it doesn’t work.
I found solutions and some hacky things online but nothing worked. Then I came across your solution here https://michaelbox.net/2020/06/slugless-post-type-permalinks/ (I tried to comment on your post btw but the WordPress Zero Spam plugin on your site thinks I’m spam *shrug*). Anyway, the code does remove the slug but the pages return 404s, flushing the permalinks didn’t help. I did notice through my testing that the Permalinks on the site are set to a Custom Structure %category%%postname% I wondered if changing it from Custom Structure to Post name would work and it did. I’m just trying to sort out why your solution doesn’t work with the Custom Structure. Do you have any ideas on how I might fix that? It would be greatly appreciated because it’s driving me crazy. ??
Cheers
- The topic ‘Setting ‘With Front’ to False Does Not Work’ is closed to new replies.