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've created a new custom post type with WordPress. However, the slug adds the post to a parent, like so:


However, I'd like it to create:


Is this possible? This is how I've registered the post type:

function create_films() {
  register_post_type( 'films',
      'labels' => array(
        'name' => 'Films' ,
        'singular_name' =>  'Films'

    'public' => true,
    'has_archive' => false,
    'taxonomies' => array('category', 'post_tag') 


add_action( 'init', 'create_films' );

And this is the documentation.

share|improve this question
rewrite => array('with_front' => false); Read More About CPT Rewrites – Howdy_McGee Dec 11 '13 at 16:38
Hmm, I've added 'rewrite'=> array( 'with_front' => false ) but it's still appearing. I've also refreshed the permalinks settings. – tmyie Dec 11 '13 at 16:45
same question with solution here. – Milo Dec 11 '13 at 17:44

I've been using Custom Permalinks plugin for a while and works ok.

share|improve this answer

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.