updated   : May 15, 2012
we now have 588 snippets
By : , on October 25, 2011 9:00 am

Change default “Enter title here” text within post title input field

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will let you change the default “Enter title here” text that is displayed within post title input field.

snippet :  PHPcopy
function title_text_input( $title ){
     return $title = 'Enter new title';
}
add_filter( 'enter_title_here', 'title_text_input' );
  • David

    Great tip! How would you change the text for a specific custom post type only?

    • MattStrange

      function custom_title_text( $title ){$screen = get_current_screen();if ( ‘customposttype’ == $screen->post_type ) {$title = ‘My Custom Post Type Title Text’;}return $title;}add_filter( ‘enter_title_here’, ‘custom_title_text’ );

      • David

        That’s exactly what I needed, thanks Matt!

    • MattStrange

      function custom_title_text( $title ){$screen = get_current_screen();if ( ‘customposttype’ == $screen->post_type ) {$title = ‘My Custom Post Type Title Text’;}return $title;}add_filter( ‘enter_title_here’, ‘custom_title_text’ );

    • http://wpsnipp.com Kevin Chard

      David what Matt posted should work fine,

  • http://gadgetsnewsline.com/ GadgetsNews

    Thanks for the informative post with coding.

    • http://wpsnipp.com Kevin Chard

      No problem anytime,