Last active
December 15, 2015 07:49
-
-
Save szbl/5225881 to your computer and use it in GitHub Desktop.
Easily edit the "Enter Title Here" message when editing a post based on post type slug. This example uses "szbl-location" as seen in my WordCamp San Diego 2013 presentation.
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_filter( 'enter_title_here', 'szbl_enter_title_here' ); | |
function szbl_enter_title_here( $title ) | |
{ | |
switch ( get_post_type() ) | |
{ | |
case 'szbl-location': | |
$title = 'Enter Location Name'; | |
break; | |
} | |
return $title; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment