antoinicolas
Member
Posted 1 year ago #
I would like a tiny plugin to set programmatically the title of posts from a Custom Post Type.
Title for this Custom Post Type is hidden to Editor, so I want the system to set the title automatically for consistency, using a unique timecode.
Could you please help me ?
Kakoma
Member
Posted 4 months ago #
This is long overdue but just in case someone needs it, it is best to use the 'enter_title_here' filter and modify the title to hold something relevant to your custom post type
add_filter('enter_title_here','themeSlug_alter_title_label',10,2);
function themeSlug_alter_title_label($label, $post){
if( 'book' == get_post_type($post) )
$label = __('Enter book title here', 'guntu');
return $label;
}