Change “Enter title here” in WordPress “Add New Posts” Editor

When you add a new post in WordPress, the field where you enter the title says, “Enter title here.” This code lets you change that default text to whatever you choose. Make 2 choices before using this code.

First, choose the text that should replace “Enter title here” inside the title input field. In my code below, on line 4, I have ‘Enter a Headline’. Replace that text which whatever you choose. Don’t touch the single quotes.

Second, choose which post type should be affected by this change (post, page, or custom-post-type). On line 3 below, I have specified ‘post_type’. Replace ‘post_type’ with your own custom post type, or ‘post’ or ‘page’.

function isa_change_default_title( $title ){
   $screen = get_current_screen(); 
   if  ( 'post_type' == $screen->post_type ) {
        $title = 'Enter a Headline';
   } 
   return $title;
}
add_filter( 'enter_title_here', 'isa_change_default_title' );

See more: ,

By

Questions and Comments are Welcome

Your email address will not be published. All comments will be moderated.

Please wrap code in "code" bracket tags like this:

[code]

YOUR CODE HERE 

[/code]