WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to prefix my blog posts with /news/ and changing my Permalinks to /news/%postname% seems to do the trick.

However, I also have a few custom post types and for some reason those URL's are now also prefixed with /news/. Of course this is not what I want.

How can I make sure that only the out-of-the-box Wordpress post type is prefixed with /news/?

share|improve this question
why don't you create a category called News to mark your posts, and set the links to /%category%/%postname% ???? – andresmijares25 Nov 20 '11 at 5:41
Hmm. that seems to be a work around, albeit somewhat unclean. It's seems to be working though. Not sure yet how I feel about this solution in the long term. – Luke Nov 20 '11 at 5:51
up vote 1 down vote accepted

Assuming that you are not using a plugin to handle your post types but are registering them manually:

Add the rewrite argument to your register_post_type() function calls.

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

$args = array(
    // your other arguments
    'rewrite' => $rewrite

register_post_type( 'name_of_your_post_type', $args );

If your registering your post types with some plugin, check whether it has an option to set with_front to false. It defaults to true (unfortunately, for your sake).

Whether there's a plugin out there that has this feature I don't know - never used no post type plugin(s).

share|improve this answer
'with_front' => false was exactly what I was looking for. – Luke Nov 20 '11 at 8:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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