2

I've created a new custom post type with WordPress. However, the slug adds the post to a parent, like so:

http://example.com/UNNCESSARY-PARENT/post-title

However, I'd like it to create:

http://example.com/post-title

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

function create_films() {
  register_post_type( 'films',
    array(
      '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.

3

1 Answer 1

0

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

Your Answer

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

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