Set Custom Post Title Programmatically (2 posts)

  1. antoinicolas
    Posted 4 years 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 ?

  2. Kakoma
    Posted 3 years 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

    function themeSlug_alter_title_label($label, $post){
            if( 'book' == get_post_type($post) )
                $label = __('Enter book title here', 'guntu');
            return $label;

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.