/ Published in: PHP
WP Functions.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* REPLACE PROTECTED-PRIVATE POSTS */ function the_title_trim($title) { // Might aswell make use of this function to escape attributes $title = attribute_escape($title); // What to find in the title '#Protected:#', // # is just the delimeter '#Private:#' ); // What to replace it with 'a', // What to replace protected with 'b' // What to replace private with ); // Items replace by array key return $title; } add_filter('the_title', 'the_title_trim');