I wanted to add blog before the post slug in the URL.

The URL for the post type page was:


So basically to add blog before the posts url in Settings >> permalink I have selected Custom structure and the value /blog/%postname%/

As I have entered the base in permalink structure it adds blog base to custom post type URLs as well.

There are too many custom post types. it shows this base before all urls.

Custom post type url: http://example.com/blog/news/post-name

while it should be http://example.com/news/post_name

custom post type url should be without the base i added in custom permalink for default post type.

What's the solution of it.? How can i fix it?


1 Answer 1


Add this on your register post type function:

'rewrite'         => array(
      'slug'      => 'news',
      'with_front'  => false

The "with_front => false" will remove the "blog" from the path.

Hope that it helps,

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