X

Change ‘Enter Title Here’ Text For Custom Post Type

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.

Code Snippet:

<?php

function change_default_title( $title ){
     $screen = get_current_screen();
 
     if  ( '_your_custom_post_type_' == $screen->post_type ) {
          $title = 'The new title';
     }
 
     return $title;
}
 
add_filter( 'enter_title_here', 'change_default_title' );
?>

Comments  Leave a Reply

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!