TLCJohn
Member
Posted 7 months ago #
Hi there Guys.
Please can I ask for some help. I am building a site at the moment and there are some pages that are protected. The Client has requested that I remover the word "Protected" for these pages but I cannot find out how to do it. Can anyone help please.
Kind regards
John
sjovic
Member
Posted 7 months ago #
I have the same problem.
Old posts (3 yrs before cant help!)
Regards,
Slobodan
Add this to your theme's functions.php file, eg. wp-content/themes/YOURTHEME/functions.php
add_filter( 'protected_title_format', 'remove_protected_text' );
function remove_protected_text() {
return __('%s');
}
TLCJohn
Member
Posted 7 months ago #
Hi there Mark,
Thank you for the code... Where about's in the functions.php file would I place the code you have so kindly written?
Kind regards
John
After the <?php (opening php tag), on a new line at the top of the file would probably be the easiest place(less room for error).
:)
TLCJohn
Member
Posted 7 months ago #
Hi there Mark.
Thank you for your help, You are a smashing guy for helping me out. I am trying to learn WordPress quickly and your help is much appreciated.
Kind regards.
John
TLCJohn
Member
Posted 7 months ago #
Hi Mark (again)
Footnote. I have just added the code into the php file and it works beautifully. Thank you, thank you, thank you.
All the very best for now.
Kind regards
John
sjovic
Member
Posted 7 months ago #
Mark, Thank you for your help. It helped me a lot!
Rgeards,
Sjovic.