I need to change blog post permalink to /post/post-title & I want to remove "custom-post-type" slug from the custom post type so that /custom-post-title will be shown.

These two doesn't work with each other, I can either remove custom-post-slug with rewrite or I can add post to blog-post with permalink in settings. I even tried PHP codes to do same, but didn't work. How can I get desired output? Already tried rewrite slug for CPT & with_front=false.

1 Answer 1


with_front=false is the key, but WordPress also seems to like to hard-cache the settings you originally register a CPT with. Try unregister_post_type() above the CPT registration so it's completely removed and immediately added again from scratch with the with_front setting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.