<?php
function change_default_title( $title ){
$screen = get_current_screen();
if ( $screen->post_type == 'product' ) {
return 'Enter New Product Here';
}
}
add_filter( 'enter_title_here', 'change_default_title' );
//To change the title on normal default Wordpress posts we can use the same function as above but can remove the check of the post type.
function title_text( $title ){
return $title = 'Enter new title';
}
add_filter( 'enter_title_here', 'title_text' );
<?php
function change_default_title( $title ){
$screen = get_current_screen();
if ( $screen->post_type == 'product' ) {
return 'Enter New Product Here';
}
}
add_filter( 'enter_title_here', 'change_default_title' );
//To change the title on normal default Wordpress posts we can use the same function as above but can remove the check of the post type.
function title_text( $title ){
return $title = 'Enter new title';
}
add_filter( 'enter_title_here', 'title_text' );