Created
February 6, 2014 17:22
-
-
Save mikemanger/8848670 to your computer and use it in GitHub Desktop.
Add to WordPress theme's functions.php or plugin. Changes the 'Enter title here' text for certain post types (most examples don't realise you can get the post type from the filter.
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
/** | |
* Change the title placeholder text | |
*/ | |
function my_plugin_change_default_title( $title, $post ){ | |
if ( 'posttype' == $post->post_type ) { | |
$title = 'Enter new title here'; | |
} | |
return $title; | |
} | |
add_filter( 'enter_title_here', 'my_plugin_change_default_title', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment