Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Last active April 26, 2018 12:43
Show Gist options
  • Select an option

  • Save Pebblo/fd4033c51d3ba497d52e to your computer and use it in GitHub Desktop.

Select an option

Save Pebblo/fd4033c51d3ba497d52e to your computer and use it in GitHub Desktop.
Removes 'Protected: ' from EE Event post titles
<?php
// Function to remove 'Protected: ' from EE Event titles.
function tw_ee_protected_title_format($protected_title_title, $post) {
if ($post->post_type == 'espresso_events') {
return '%s';
}
return $protected_title_title;
}
add_filter('protected_title_format', 'tw_ee_protected_title_format', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment