Password protected page not rendering html

Hi!

When trying to access a passworded page, I get the page prompting me to enter a password. Like so:

My problem is, the opening and closing p tags are displayed. How to make them render like html?

If there is any way I can customize the text displayed as well, that would be awesome. Much googling only shows old articles, predating the way WP handles password pages now.

Thanks :slight_smile:
Thomas

Hi Thomas,

I hope you are well today and thanks for posting here.

My problem is, the opening and closing p tags are displayed. How to make them render like html?

I could confirm the issue on my test site using latest version of Sparkling theme therefore i have notified the theme developer about this so that it can be fixed.

In the meanwhile you can fix it by using the attached small plugin.

If there is any way I can customize the text displayed as well, that would be awesome. Much googling only shows old articles, predating the way WP handles password pages now.

You can change it by developing the code using the filter the_password_form the same way as i did in the attached plugin code.

Best Regards,
Movin

Thanks for the reply.

I managed to solve it :slight_smile: After a lot of poking about in the code, it dawned on me that the <p> tags were merely text from the original .pot file.

The .pot file contains:

#: …/inc/extras.php:125
msgid β€œ<p>This post is password protected. To view it please enter your password below:</p>”
msgstr β€œβ€

I did a translation, so the .po file reads:

"<p>This post is password protected. To view it please enter your password "
β€œbelow:</p>”
msgstr β€œThis post is password protected. To view it please enter your password below:”

All sorted :slight_smile:

Hi Thomas,

Awesome great to see you got that sorted.

Please advise if you have more questions.

Have a fantastic day!

Cheers,
Movin