Support

Home Forums Event Espresso Premium Remove/reword "Protected: " in Event Listing

Remove/reword "Protected: " in Event Listing

Posted: April 20, 2015 at 7:46 pm


John at TRC

April 20, 2015 at 7:46 pm

I’d like to replace the string “Protected: ” in the Events page. All of my events are password protected, so that text is redundant. I’ve created a custom plug-in that tries to swap the string (amongst other successfully replaced strings) to no avail. My code in question includes the following:

“Protected: ” => “Secure Member’s Area: “,
“Protected:” => “Secure Member’s Area:”

Is there something I’m missing? Please help.


Tony

  • Support Staff

April 21, 2015 at 1:51 am

Hi John,

The ‘Protected:’ string is actually a WordPress core function rather than Event Espresso.

When you password protect a post, WP will Prefix ‘Protected:’ to the post title.

You can change this using a function such as:

add_filter('protected_title_format', 'blank');
function blank($title) {
       return '%s';
}

Which will completely remove ‘Protected:’.

In your example you could use:

add_filter('protected_title_format', 'blank');
function blank($title) {
       return 'Secure Member’s Area: %s';
}

Note, this change would apply to all protected posts/pages, not just Event Espresso events.

The support post ‘Remove/reword "Protected: " in Event Listing’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso