Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When I'm reading a custom type post in the single view, I see that the URL is

How to get rid of this ugly /my_custom_post_type/ ?

share|improve this question

1 Answer 1

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.