• Posted: 2012-04-12
  • Author: Filip Stefansson
  • Tags:

Change ‘Enter Title Here’ Text For Custom Post Type

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
<?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' );
?>

Instructions:

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.


Related links:
http://www.johnkolbert.com/wordpress/change-enter-title-here-text-in-wordpress-3-1/
Share this snippet

If you like this snippet, share it with friends!