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

At present I'm using this permalink structure /%category%/%postname%/. There are some existing post type. I want to change permalink for image post type to image/%post_id%/, and don't want to affect other post type and their permalinks.

share|improve this question

This will be done when you register_post_type :

  $args = array(
        'rewrite' => array( 'slug' => 'book' ),

    register_post_type( 'book', $args );

IMPORTANT ! Remember to go to wp-admin options > permalink and click SAVE on that page for the changes to take effect.

share|improve this answer
I'm using core post type "Image" (theme default). So how can i re-declare it? Please elaborate. I added above code in functions.php and changed 'book' to 'image' & it didn't work. – Prateek May 6 '13 at 12:38
solved by myself.. :D thanks for reply. – Prateek May 6 '13 at 13:45
Great! hope it helped. Have a nice day – ThaWolf May 6 '13 at 15:31

I would give the Custom Post Type Permalinks plugin a try (it sounds like it will allow you to do exactly what you want).

Alternatively you could probably manually edit your rewrite rules (in .htaccess), however re-saving your permalink settings would probably reset your rules each time.

Hope that helps, have fun!

share|improve this answer
but that change only for custom post type, not for default one. How it will work for default post types? – Prateek May 5 '13 at 19:07
solved by myself.. :D thanks for reply. – Prateek May 6 '13 at 13:25
It's better etiquette to reply here with your solution in case someone else runs into the same problem. – Jared Cobb May 6 '13 at 14:39
i didn't solve this. I just created a new post type named "Image" and called all arguments by using 'support' in argument array. Still there are some problems with it :( that it is calling wp default argument, while as i need theme functions in custom post type. Still finding this answer. Do u know abt it? – Prateek May 6 '13 at 18: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.