• Resolved curiousonepdx

    (@curiousonepdx)


    The word “Protected:” is added to the post title that has password protection. This looks like part of the title name, which it is not. How can it be removed, or replaced with the lock icon??</img>?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Hi @curiousonepdx – could you please provide a link to an example of a password-protected post or page on your site so I can take a look and better help? Thanks!

    Moderator Kathryn Presner

    (@zoonini)

    Oh also, could you upload the lock image you’d like to use to your Media Library and provide the image path here? (use the code block for that)

    Moderator Kathryn Presner

    (@zoonini)

    Ah, I just noticed the “Protected” words on the front page, not on individual posts like https://michaelmc.me/2022/12/28/jef/

    One way to remove the word there would be to create a child theme and then modify the theme files.

    Another way would be to use custom CSS, adding your overrides to the CSS editor a Appearance > Customize > Custom CSS.

    In both cases, you can ask for help with that from Elementor support, since you’ve used Elementor to build the front page of your site, rather than the built-in WordPress editor.

    I hope this helps point you in the right direction. Just let me know if you have other questions!

    Thread Starter curiousonepdx

    (@curiousonepdx)

    Hello Kathryn @zoonini!

    Thanks for looking at this. It appears you found the page I was referring to – with the gallery of post image/links. For the replacement ‘image,’ I just want to use the lock typography icon from FontAwesome or Google Fonts.

    Because the text “Protected:” is included in the code <span>Protected: US Marine Corps</span>, it seems that it would have been concatenated outside of CSS. Maybe in js? The main theme is WP Twenty Seventeen. And the ‘protected’ text is only added when I add a password to the post in Quick Edit mode in the control panel, otherwise, it’s blank. I tried 3 different plugins from 3 different developers, and the behavior is the same. So, it has to be part of the main theme.

    I will look into a Child theme. But I’m assuming it will be a matter of trial and error to find something that will NOT add ‘protected’ to the title. And I’ll send a message to Elementor too. I also sent a message to Hash One, who is the developer of that particular post gallery. Maybe they can look into it as well.

    Thanks again! Michael

    Moderator Kathryn Presner

    (@zoonini)

    I tried 3 different plugins from 3 different developers, and the behavior is the same. So, it has to be part of the main theme.

    It’s actually coming from WordPress core, which is why the behaviour is the same across themes.

    You could try adding a PHP function like this one to remove “Protected”:

    https://tosbourn.com/removing-protected-private-wordpress-posts/

    (Please note that this code is a little old, and I can’t vouch for it, but you can experiment with this or similar example functions that are available on the web.)

    You’d either place the PHP function in your child theme‘s functions.php file (do not edit your theme’s files directly!), or you could use a snippets plugin like this one – https://www.ads-software.com/plugins/code-snippets/ – which would avoid the need for a child theme.

    Thread Starter curiousonepdx

    (@curiousonepdx)

    YES! That was perfect – thank you!

    Using the plugin Code Snippets was easy and smooth. and the PHP function code worked flawlessly. The code simply eliminates the word ‘Protected’, but allows editing as well. I was able to include the inline Unicode for a padlock (&#1F1512) and it looks great.

    This article you referred is an excellent resource discussing the issue.

    https://tosbourn.com/removing-protected-private-wordpress-posts/

    Moderator Kathryn Presner

    (@zoonini)

    That’s so great to hear, @curiousonepdx – glad that snippet and the plugin both worked out well. Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘“Protected:” in password protected posts titles’ is closed to new replies.