How to programatically set the post title of a CPT on wp-admin

You can use the enter_title_here filter:

    add_filter('enter_title_here','wpse51871_alter_title_label',10,2);
    function wpse51871_alter_title_label($label, $post){
        if( 'question' == get_post_type($post) )
            $label = __('enter question here', 'my-plugin-text-domain');

        return $label;
    }

Leave a Comment