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

When I'm reading a custom type post in the single view, I see that the URL is www.my_site.com/my_custom_post_type/title_of_my_post.

How to get rid of this ugly /my_custom_post_type/ ?

share|improve this question
up vote 2 down vote accepted
register_post_type( 'my_custom_post_type', array(
    'rewrite' => array( 'with_front' => false ),
    // other args

Make sure you flush your permalinks after changing your code - simply going to Settings > Permalinks is sufficient.

share|improve this answer
I'm using Custom Post Type UI plugin and they have only the following options : public, show UI, has archive, capability type, hierarchical, rewrite, custom rewrite slug, query var, menu position, show in menu, supports, built-in taxonomies. I guess what you mention cannot be changed with this plugin :( – Mike Jul 2 '11 at 10:29

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.