WordPress Snippet
Last active
February 17, 2017 10:09
-
-
Save ControlledChaos/039b907aa2423576a4e6 to your computer and use it in GitHub Desktop.
Replace title placeholder in custom post type
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 | |
function ccd_change_cpt_title( $title ) { | |
$screen = get_current_screen(); | |
if ( 'custom_post_type' == $screen->post_type ) { | |
$title = 'Placeholder Text'; | |
} | |
return $title; | |
} | |
add_filter( 'enter_title_here', 'ccd_change_cpt_title' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment