Site logo

Archived topic

Show preview on password protected posts?

5 replies · Started by Sven on August 5, 2021

Viewing posts 1–6 of 6

Hi guys,

i wonder if it is possible to show a preview of password protected posts. Maybe the

Wordpress offers the possibilty to show preview text. But it does not appear on protected posts.

Is this possible?

Thanks and best regards.

Hi Sven,

I don't believe WordPress offers this functionality unfortunatly.

Hi Leo,

thank you for your reply. I found a post on the internet yesterday, that said, that some Themes may offer this functionality.

But i trust you more than a post in an internet forum ;)

So thank you for your reply.

Regards, Sven

WOW! Thanks!

Thats exactly what i was looking for.

I did not know the "preview" is called "excpert" in english :)

Thanks a lot and best regards, Sven

PS: This above method does not work anymore. It shows the excerpt but in the full articles it only shows the picture of the article. But no i can search further. Thanks anyway.

PPS: I found this method, which is working very well. (https://stackoverflow.com/questions/5733574/wordpress-post-password-protected-excerpt) Unfortunately it sometimes shows the "This page is password protected." message and sometimes not. Maybe it is an idea to put this feature in Generatepress sometimes. But i guess not ;-)

Glad to hear you found a solution! And thanks for sharing that.
Its a tricky one to implement in the theme, as it relies on the gettext filter, and that search string has to be identical for it to work... which may not be the case for all users sites.

Looks like a pretty simple bit of code though :)

This archived topic is closed to new replies.