X

Change Default ‘Enter Title Here’ for Custom Post Types

Snippets by IsItWP

By default, the placeholder for the title field of all post types will be same. You can change default ‘Enter Title Here’ for custom post types.

Instructions: Add the following code to the functions.php of your WordPress theme.
You’ll need to update the POST_TYPE name and default text in the code below.

function change_default_title( $title ){
     $screen = get_current_screen();
     if  ( 'POST_TYPE' == $screen->post_type ) {
          $title = 'Enter Invoice Title';
     }
     return $title;
}
add_filter( 'enter_title_here', 'change_default_title' );

You may also enjoy modifying custom post types in WordPress.

Comments   Leave a Reply

  1. This doesnt seem to work (WP 3.8)

  2. hello
    how can i set one title for each post type i have? tx a lot!

    1. add_filter(‘enter_title_here’, ‘my_title_place_holder’ , 20 , 2 );
      function my_title_place_holder($title , $post){

      if( $post->post_type == ‘portfolio’ ){
      $my_title = “Add new Portfolio”;
      return $my_title;
      }

      return $title;

      }

  3. Interview with Dave Clements from DoitWithWP June 4, 2012 at 8:45 am

    […] man in that camp is Kevin Chard from WPSnipp; he’s just doing it to help people out. For developers, you obviously can’t miss the […]

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!