Forked from isGabe/wp_custom_title_placeholder_text.php
Created
July 9, 2014 15:22
-
-
Save ethanclevenger91/3cff7cf273a64f988e59 to your computer and use it in GitHub Desktop.
Change placeholder text for "Enter title here" on a custom post type
This file contains hidden or 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 | |
/* | |
replacing the default "Enter title here" placeholder text in the title input box | |
with something more descriptive can be helpful for custom post types | |
place this code in your theme's functions.php or relevant file | |
source: http://flashingcursor.com/wordpress/change-the-enter-title-here-text-in-wordpress-963 | |
*/ | |
function change_default_title( $title ){ | |
$screen = get_current_screen(); | |
if ( 'your_custom_post_type' == $screen->post_type ){ | |
$title = 'Your custom placeholder text'; | |
} | |
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