Skip to content

Instantly share code, notes, and snippets.

@yoren
Last active December 12, 2015 07:28
Show Gist options
  • Save yoren/4737280 to your computer and use it in GitHub Desktop.
Save yoren/4737280 to your computer and use it in GitHub Desktop.
WordPress: Change “Enter Title Here” placeholder
<?php
/**
* @link http://www.wpexplorer.com/useful-wordpress-snippets/
*/
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' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment