I have a "report" Custom Post Type registered in this way:
register_post_type(
'report',
array(
'label' => 'Reports',
'description' => '',
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => array('slug' => ''),
'query_var' => true,
'exclude_from_search' => false,
'supports' => array('custom-fields','comments','author',),
...
)
);
As you can see, my report
does not support title
, but only custom-fields
, comments
, and author
:
'supports' => array('custom-fields','comments','author',)
Hovewer, since the permalink of a post normally is something like:
http://mywebsitename.com/report/the-title
now I always get something like:
http://mywebsitename.com/report/auto-draft/
I suppose that "auto-draft" is the title that is given by default to my report. I have no idea how to give a reasonable permalink. I would like to give one based on the custom-fields
.