WordPress 3.1 adds a new filter that allows you to change the ‘Enter Title Here’ text that appears in the title input text field. Here’s how it looks now:

With a little bit of magic, we can get our own text there. Previously this required using javascript to change this text, but 3.1 creates a new ‘enter_title_here’ filter that gives us better control.
To change the default text, simply create a new function and hook it to the ‘enter_title_here’ filter, such as below:
function jk_change_default_title( $title ){
$title = 'My New Title';
return $title;
}
add_filter( 'enter_title_here', 'jk_change_default_title' );
For better control, we can use this to only change the title of specific post types. This is great for custom post types. In this example, we’ll use the custom post type of ‘invoice’.
function jk_change_default_title( $title ){
$screen = get_current_screen();
if ( 'invoice' == $screen->post_type ) {
$title = 'Enter Invoice Title';
}
return $title;
}
add_filter( 'enter_title_here', 'jk_change_default_title' );
This is the end result:

Here is the Trac discussion about this.


Andrew Rowland
January 17, 201111:32 pmMakes me happy to see this…
Andrew Nacin
January 18, 20113:16 amYou also could have used the gettext filter (runs on all translations) in 3.0. But this does make it easier.
John Kolbert
January 19, 20118:28 pmI’d not thought to use the gettext filter. Thanks for the tip!
Murali
January 29, 20116:52 ami think , you can use gettext to change all of the post titles. I am not sure if you can use that for custom post type.
Mike
January 31, 20114:40 amIf you are executing admin function or class via your themes’ function.php you can assign this directly with jQuery .html() to the #title-prompt-text.
http://jhnk.pastebin.com/ev94uaNB
Pothi
March 2, 20117:58 amGreat tip. I wish you write more often.
Martin
March 12, 20116:57 pmi had this problem sometimes ago, but then I sorted it out through one such post through google search, thanks for sharing such a nice piece of info with us.
Troy Peterson
March 15, 20116:00 pmRan into an issue with this, but found the problem.
When I added the code for the Custom Post type, it was causing problems with my admin_ajax in custom taxonomy.
It’s a simple fix though… simply add the filter above the function in the in your functions.php file:
http://jhnk.pastebin.com/UMT3RM2P
agabu
March 15, 20117:20 pmThanks a lot John. This is what I’ve been looking for today, just used for my custom post type and it worked great.
Nick
March 26, 20111:55 amGreat post! Thank you John!
The Frosty
April 18, 20114:51 pmAwesome, sometimes I always forget to set the variable and return the original. Had to see it written out.
Thanks.
Paulo
May 1, 201110:16 amHi, great tip! I was looking for this and it helped. I wonder if there’s a function to add text (“how to”, “post rules”) to the post input field! Any help? Thank!
online hgh
May 11, 201111:17 ammy wish was always to learn wordpress completely but now i think that my dream will become true here by John Kolbert
Thanks Buddy
john
May 27, 20114:57 pmquite interesting and lovely post, I like it, thanks a lot for sharing such a nice post with us.
lene
May 28, 201110:11 pmThis is really innovative and a new idea, I like this concept of yours and the way it is carried out in so light and cool manner. its really wonderful.
jim
May 29, 201110:13 amNice ideas discussed, I liked the way you shared your ideas so comprehensively. Thanks for sharing such a nice post.
Greg
July 28, 20114:37 amAwesome! Thanks for this. I was looking for a way to change the title prompt for each different custom post type, and this just took all the work out of it for me. Saved me a boat load of time. Thanks John, and thanks google!
Kieran Malone
August 6, 201111:51 pmThank you! This saved me a good few anoying minutes
Kieran Malone
August 6, 201111:51 pmIll use those free minutes to work on my spelling…
agussudaryanto
August 22, 20118:29 amthanks john, I liked the way you shared your ideas so comprehensively.
'Thomas
September 9, 20118:01 pmGreat post! Thank you John!
Ayoub
September 12, 201112:06 pmThank you
works like a charm
Roxanne
September 15, 20113:37 amThanks so much! Exactly what I was after, but surprisingly hard to find in the Codex.
Plitvice
September 18, 20117:32 amperfect!
thank you very much for the post!
Escorts
October 25, 201110:57 amAwesome! Thanks for this.
Asad Wahab
November 1, 20116:31 pmThanks for such an informative and worth reading post, I would like to say a thanks for sharing an amazing post. Am specially impressed with your writing skills. Its really a nice article…
Andrea
November 11, 20118:23 pmHi John, thank´s a lot and greetz form Germany!
Alexander
December 2, 20116:42 pmThanks for guiding me, its really helpful for me
Leandro de Amorim
January 16, 20121:18 pmSimplesmente útil. Thank you!
Brent Tilley
January 26, 20122:59 pmThanks for the useful tip!
pandikamal
February 2, 20122:28 pmits awesome tips.
Sam
February 2, 20128:28 pmAh, beautiful. Works like a charm! Thanks.
Jan
February 15, 20128:31 pmThanks! That was very helpful for me at this moment! What a time saver!