Skip to content

Instantly share code, notes, and snippets.

@rachelbaker
Created February 7, 2012 03:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rachelbaker/1757047 to your computer and use it in GitHub Desktop.
Save rachelbaker/1757047 to your computer and use it in GitHub Desktop.
WordPress Custom Title for Custom Post Type Screen
<?php
/**
* TODO: Replace cptname with name of custom post type
* TODO: Replace Screen Title Text Here with the content for the title box
*/
function custom_cptname_title( $title ){
$screen = get_current_screen();
if ( 'cptname' == $screen->post_type ) {
$title = 'Screen Title Text Here';
}
return $title;
}
add_filter( 'enter_title_here', 'custom_cptname_title' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment