Created
September 8, 2012 21:15
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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