Skip to content

Instantly share code, notes, and snippets.

@rubel306
Last active September 12, 2020 19:18
Show Gist options
  • Save rubel306/01be1b39d5ba05339b59e2915ca0194c to your computer and use it in GitHub Desktop.
Save rubel306/01be1b39d5ba05339b59e2915ca0194c to your computer and use it in GitHub Desktop.
//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