WordPress custom post type with folder structure in slug

I have setup a custom post type with the slug “interview” and it is working fine. I am trying to change the slug to “magazine/interview” but I keep getting 404 errors when I try to access the posts that are already there.
Is there any specific trick to set a slug with “/” characters in it?

Related posts

Leave a Reply

2 comments

  1. Make sure to flush rewrite rules after changing the permalink structure, this can be done by visiting the Settings > Permalinks page in admin.

  2. I don’t think there is any way to use “/” in slug. I have Another solution for you. Create custom post type with slug “magazine” and create category “interview” now you have desired url “magazine/interview”.