Skip to content

Instantly share code, notes, and snippets.

@joshmcrty
Created September 8, 2012 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshmcrty/3679817 to your computer and use it in GitHub Desktop.
Save joshmcrty/3679817 to your computer and use it in GitHub Desktop.
Change the default text in the title field of a WordPress post (post, page, or custom post type)
function change_default_title( $title ) {
$screen = get_current_screen();
if ( 'post' == $screen->post_type ) { // Replace 'post' with the name of the post type you want to use with the new title
$title = 'Enter headline here';
}
return $title;
}
add_filter( 'enter_title_here', 'change_default_title' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment