Last active
December 12, 2015 07:28
-
-
Save yoren/4737280 to your computer and use it in GitHub Desktop.
WordPress: Change “Enter Title Here” placeholder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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