Skip to content

Instantly share code, notes, and snippets.

@corsonr
Created December 8, 2012 10:38
Show Gist options
  • Save corsonr/4239742 to your computer and use it in GitHub Desktop.
Save corsonr/4239742 to your computer and use it in GitHub Desktop.
Custom Enter Title Here
<?php
/**
* Modify the "Enter title here" text when adding new CPT, post or page
*
* @access public
* @since 1.0
* @return void
*/
function rc_change_default_title( $title ){
$screen = get_current_screen();
if ( '_your_custom_post_type_' == $screen->post_type ) {
$title = 'The new title';
}
return $title;
}
add_filter( 'enter_title_here', 'rc_change_default_title' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment