Home / admin / Change default “Enter title here” text within post title input field
  • How to Change default “Enter title here” text within post title input field

    chnage-default-enter-title-here-text-within-post-title-input-field

    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.

    wordpress snippet : PHP

    <>
    function title_text_input( $title ){
         return $title = 'Enter new title';
    }
    add_filter( 'enter_title_here', 'title_text_input' );
    

    ( WordPress codex functions, hooks, in this snippet. )

    add_filter,
  • 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’ );

    • David what Matt posted should work fine,

  • Thanks for the informative post with coding.

  • Pingback: WordPress dashboard hacks for developers and freelancers | CatsWhoCode.com()

  • Pingback: WordPress dashboard hacks for developers and freelancers | CatsWhoCode.com()

  • Pingback: 3 WordPress Title Box Hacks - WPMU.org()

  • Bobo

    Do you know how to change text “Select a category” on widget product categories in woocommerce?
    I want to translate in Croatian.
    Tnx