Last active
August 29, 2015 14:00
-
-
Save Kenty/450c943b01333b328ba1 to your computer and use it in GitHub Desktop.
Change "Enter Title Here" placeholder snippets
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 change_default_title( $title ) { | |
$screen = get_current_screen(); | |
// custom post type: blogs | |
if ( 'blogs' == $screen->post_type ) { | |
$title = 'The new Blogs title'; | |
} | |
//custom post type: portfolio | |
elseif ('portfolio' == $screen->post_type ) { | |
$title = 'The new Portfolio title'; | |
} | |
return $title; | |
} | |
add_filter( 'enter_title_here', 'change_default_title' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment