Created
October 15, 2014 15:25
-
-
Save wpspeak/261db7c594640812c5d9 to your computer and use it in GitHub Desktop.
Edit or Remove "Protected" and "Password Protected" from Post Titles
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 | |
//* Remove "Private: " from Private Post Titles | |
function wpspeak_format_post_title($content) { | |
return '%s'; | |
} | |
add_filter('private_title_format', 'wpspeak_format_post_title'); |
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 | |
//* Remove "Password Protected: " from Password Protected Post Titles | |
function wpspeak_title_format_post_title($content) { | |
return '%s'; | |
} | |
add_filter('protected_title_format', 'wpspeak_format_post_title'); |
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 | |
//* Remove both "Private: " and "Password Protected: " from Post Titles | |
function wpspeak_title_format_post_title($content) { | |
return '%s'; | |
} | |
add_filter('private_title_format', 'wpspeak_format_post_title'); | |
add_filter('protected_title_format', 'wpspeak_format_post_title'); |
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 | |
//* Replace "Private: " from Private Post Titles | |
function wpspeak_format_post_title($content) { | |
return 'Confidential: %s'; | |
} | |
add_filter('private_title_format', 'wpspeak_format_post_title'); |
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 | |
//* Replace "Password Protected: " from Password Protected Post Titles | |
function wpspeak_title_format_post_title($content) { | |
return 'Confidential: %s'; | |
} | |
add_filter('protected_title_format', 'wpspeak_format_post_title'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment