Title: changing permalink for a custom post
Last modified: September 1, 2016

---

# changing permalink for a custom post

 *  Resolved [allm](https://wordpress.org/support/users/realblueorange/)
 * (@realblueorange)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/changing-permalink-for-a-custom-post/)
 * When editing a post or page I can change the title. Changing the title will result
   in a new permalink that corresponds to the new title. There is even an edit button
   to do a manual change.
 * Editing the title of a custom post will not result in a new permalink. There 
   is also no edit button to do it manually.
 * I have looked in the codex to see if there is a solution to this. I might have
   overlooked something but have not found the way to solve this.
 * Does anybody know a solution?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [cedcommerce](https://wordpress.org/support/users/cedcommerce/)
 * (@cedcommerce)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/changing-permalink-for-a-custom-post/#post-7563198)
 * Hi allm,
    Wordpress provides option to edit permalink of each and every post-
   type, no matter its custom post type. There must be some glitch with register_post_type()
   function where you have registered your custom-post-type. Try to add this line
   in your register_post_type(): ‘rewrite’ => true
 * Hope this will solve your problem.
    In case not, send me your code-snippet of
   registering custom-post-type.
 * Thanks
 *  Thread Starter [allm](https://wordpress.org/support/users/realblueorange/)
 * (@realblueorange)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/changing-permalink-for-a-custom-post/#post-7563233)
 * Yes, I do have the rewrite clause in register_post_type(). I have checked some
   more and see that other custom posts I have created in the past have the same
   problem.
 * There is no edit button for the permalink just below the title when editing the
   specific custom post (as posts and pages have). And also the permalink is not
   changed if the title is changed. Pages and posts do have a different permalink
   after changing the title.
 * Is this a bug, or on purpose? Or is there a setting in register_post_type() that
   enables/disables this?
 *  [cedcommerce](https://wordpress.org/support/users/cedcommerce/)
 * (@cedcommerce)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/changing-permalink-for-a-custom-post/#post-7563301)
 * I have asked for your code snippet. Please provide it.
 * Please try this in your register_post_type() function:
    ‘rewrite’ => array( ‘
   slug’ => ‘YOUR_CUSTOM_POST_TYPE_SLUG’ ),
 * This is working fine for me. Hope will help you too.
    Thanks
 *  Thread Starter [allm](https://wordpress.org/support/users/realblueorange/)
 * (@realblueorange)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/changing-permalink-for-a-custom-post/#post-7563327)
 * This is the snippet:
 *     ```
       'supports' => array(
               'title',
       	'editor',
               'revisions',
               'thumbnail',
       	'comments'
              ),
       'rewrite' => array(
               'slug' => '/d',
               'with_front' => false,
       	'feeds' => false,
       	'pages' => false
               ),
       ```
   
 *  Thread Starter [allm](https://wordpress.org/support/users/realblueorange/)
 * (@realblueorange)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/changing-permalink-for-a-custom-post/#post-7563335)
 * I just noticed that I am able to change the slug for a custom post, resulting
   in a change of the permalink. So I can change it when needed.
 * Just thought that there would be an edit permalink button for custom posts, just
   below the title, as pages and posts do. And it is not automatic as it is with
   pages and posts..
 * So I am still curious to know if this can be achieved for custom posts. Just 
   an edit permalink button below the title, and an automatic update of the permalink
   after editing the title. Just like pages and posts.
 *  [cedcommerce](https://wordpress.org/support/users/cedcommerce/)
 * (@cedcommerce)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/changing-permalink-for-a-custom-post/#post-7563341)
 * Hi,
    Just trust wordpress. You don’t need to do something extra. Use this basic
   code for testing purpose :
 *     ```
       // Our custom post type function
       function create_posttype() {
   
        register_post_type( 'movies',
        // CPT Options
         array(
          'labels' => array(
           'name' => __( 'Movies' ),
           'singular_name' => __( 'Movie' )
          ),
          'public' => true,
          'has_archive' => true,
          'rewrite' => array('slug' => 'movies'),
         )
        );
       }
       // Hooking up our function to theme setup
       add_action( 'init', 'create_posttype' );
       ```
   
 * You can check, you can edit permalink anytime you want. WordPress provide you
   all option for custom post types, as there is for POST and PAGES.
    Thanks
 *  Thread Starter [allm](https://wordpress.org/support/users/realblueorange/)
 * (@realblueorange)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/changing-permalink-for-a-custom-post/#post-7563358)
 * [@cedcommerce](https://wordpress.org/support/users/cedcommerce/),
 * Thanks for taking the time to help out. I do trust wordpress, but that didn’t
   help. I will check the code you provided and see if that results in an “edit 
   permalink” button below the title (like posts and pages) for that custom post.
 * If that works, I will see where the differences are with my arguments. If I have
   it pinpointed I’ll report back here.
 * Thanks so far!
 *  Thread Starter [allm](https://wordpress.org/support/users/realblueorange/)
 * (@realblueorange)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/changing-permalink-for-a-custom-post/#post-7563361)
 * [@cedcommerce](https://wordpress.org/support/users/cedcommerce/),
 * Your example gave me the basis to find out what was going on. Your example gives
   the “edit permalink button” below the title, as one would expect.
 * I noticed you had ‘public’ set to true. That argument is merely a way of defining
   4 other arguments in 1. If you set that to false (which is what I wanted) and
   then set ‘show_ui’ to true to get the user interface back you get the complete
   user interface except the “edit permalink button” below the title.
 * Seems like a bug to me, so I’ll report it and see what happens…
 *  [cedcommerce](https://wordpress.org/support/users/cedcommerce/)
 * (@cedcommerce)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/changing-permalink-for-a-custom-post/#post-7563366)
 * Good to hear that I am able to help you somehow.
    If you need any further help
   in this, please ask. If you get your solution, then please mark this query as
   resolved. Happy to help you. Thanks

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘changing permalink for a custom post’ is closed to new replies.

## Tags

 * [custom post](https://wordpress.org/support/topic-tag/custom-post/)
 * [permalink](https://wordpress.org/support/topic-tag/permalink/)
 * [title](https://wordpress.org/support/topic-tag/title/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 2 participants
 * Last reply from: [cedcommerce](https://wordpress.org/support/users/cedcommerce/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/changing-permalink-for-a-custom-post/#post-7563366)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
