Last active
September 12, 2020 19:18
-
-
Save rubel306/01be1b39d5ba05339b59e2915ca0194c to your computer and use it in GitHub Desktop.
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
//default add title placeholde text update | |
function theme_posts_editor_title_placeholder($title){ | |
$post_type = get_post_type(); | |
if($post_type == 'team'){ | |
$title = 'Add Team Member Name'; | |
} | |
if($post_type == 'pricing'){ | |
$title = 'Add New Pricing'; | |
} | |
if($post_type == 'faq'){ | |
$title = 'Add New FAQ'; | |
} | |
if($post_type == 'page'){ | |
$title = 'Add New Page Title'; | |
} | |
if($post_type == 'post'){ | |
$title = 'Add New Post Title'; | |
} | |
return $title; | |
} | |
add_action('enter_title_here', 'theme_posts_editor_title_placeholder'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment