Title: Custom post type: Create permalink from title automatically
Last modified: October 12, 2016

---

# Custom post type: Create permalink from title automatically

 *  [pilleee](https://wordpress.org/support/users/pilleee/)
 * (@pilleee)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-create-permalink-from-title-automatically/)
 * Hello folks,
 * I created a custom post type in my own plugin with the following code:
 *     ```
       register_post_type('immovation_object', array(
       	'labels' => array(
       		'name' => _x('Immobilien2', 'post type general name'),
       		'singular_name' => _x('Immobilie', 'post type singular name'),
       	),
       	'description' => "Immovation by Aweos - Description...",
       	'public' => true,
       	'has_archive' => true,
       	'revisions' => false,
       	'rewrite' => array( 'slug' => 'iiii', 'with_front' => true),
       	'menu_position' => 5,
       	'capability_type' => 'immovation',
       	'supports' => array(
       		'custom-fields',
       		'attachments',
       		'title',
       		'thumbnail',
       		'author'
       	)
       ));
       ```
   
 * When I try to create a new post from that post type andgive that new post a title,
   the permalink of that new post is created automatically as “/iiii//”.
    However,
   I would like to insert the slug from a title automatically, so that the slug 
   would be “/iiii/the-slugged-title”. How can I do that?

The topic ‘Custom post type: Create permalink from title automatically’ is closed
to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [pilleee](https://wordpress.org/support/users/pilleee/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-create-permalink-from-title-automatically/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
