Permalinks with Custom Post Types

1 register_post_type('property', array(
2 'label' => __('Real Estate'),
3 'singular_label' => __('Property'),
4 'public' => true,
5 'show_ui' => true, // UI in admin panel
6 '_builtin' => false, // It's a custom post type, not built in!
7 '_edit_link' => 'post.php?post=%d',
8 'capability_type' => 'post',
9 'hierarchical' => false,
10 'rewrite' => array("slug" => "property"), // Permalinks format
11 'supports' => array('title','author')
12 ));

Here important is #10 and #6 for custom permalink setting.


Published by


Hello, I am a software developer from Bangladesh. I develop professional web sites/applications using LAMP(Linux, Apache, MySql, PHP) Stack. I have 7 years of professional working experience developing websites on WordPress, Magento, Laravel, Yii, Code Igniter. I have in depth knowledge on following language and tools, PHP, C, C++, Java, MySql, HTML(5), CSS(3), JavaScript, jQuery, Linux, Windows, Apache, Ngnix.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s