I have add /blog/%postname% permalink option for blog posts.

Sample blog post : domain.com/blog/post-name/

I have custom post type called product. Now it permalink display as follow.


I need to use it as domain.com/product/product-name/ . How to do it? (Blog posts should be domain.com/blog/post-name/)



You have to set with_front to false when you register the post type to prevent any static prefix in your permalink structure from being prepended on custom post type permalinks.

$args = array(
    'rewrite' => array(
        'slug'       => 'product',
        'with_front' => false
    // other args...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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