I want to remove custom post type slug from URL and for this I have used this solution Removing slug from custom post type URL
It is working fine but I also want to add category with custom post type name but when I tried to add category slug then it started to redirect to 404 page. I have added category to URL using Custom Post Type Permalinks plugin.
When I remove the code that I have added for removal of post type slug then category base URL also works but both these things are not working together.
For this I have tried many solutions and at the end I got same result.
So for my website
example.com/postname also works
example.com/category/postname redirects to 404 page. I update permalinks as well but nothing is working in this case. I will really appreciate your help.