Have you ever wanted to use the Title section, but didn't want to call it Title? Surely, many of you have wanted to change the text in the title entry bar from the standard 'Enter title here' to something more specific for your custom post type. Well, WordPress has a filter for it.
[php]<?php
// Change 'Enter Title Here' text for a CPT
function wps_change_default_title( $title ){
$screen = get_current_screen();
$wps_cpt = 'wps_mycpt';
if ( $wps_cpt == $screen->post_type ) {
$title = 'Enter Staff Members Name Here'; //change this to whatever you'd like
}
return $title;
}
add_filter( 'enter_title_here', 'wps_change_default_title' );
[/php]
Dipesh says
Great, Thank You so much. I was looking for this feature in WordPress for so long. Thanks for sharing
Andrew says
You’re awesome thank you for the snippet. I put it in my core functionality plugin. Hey when are you coming out with your updated genesis theme that you’re working on?