Last active
November 1, 2019 08:23
-
-
Save Pamps/0c7a32f846ae6dfde5489ae59b9f2655 to your computer and use it in GitHub Desktop.
Change the WordPress New Post title placeholder
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 | |
// Add this to your theme functions.php file, or in a plugin file | |
// This example shows how to change the title field placeholder | |
// Post types titles | |
function cpm_change_default_title( $title ) { | |
$screen = get_current_screen(); | |
if ( 'product' == $screen->post_type ) { // Change product for your post_type (.e.g post, page, etc) | |
$title = "Enter product name"; | |
} | |
return $title; | |
} | |
add_filter( 'enter_title_here', 'cpm_change_default_title' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment