Page with template password protected

Hello all,

I use a template for 3 certain pages, the content is all the same, but in different languages.

When I use the standard pasword protect in combination with the template for these pages, acces is granted without the prompt of a password.

But, when I disable the template for these pages, the password prompt does show.

Is there a way to include the password prompt when using templates?

Hello @dennis77,

I’m not quite sure I understand the premise.
Is the content you want to password protect inside the post/page content or inside the template itself?

To take advantage of the password protection, you have to make sure that the content you want to secure is inside the Post Content block, otherwise it will be shown.

Hello @Louis,

I have three pages with acf compiled info, there a no blocks etc. in these pages, only acf data.

Then the template with the visibility conditions applied to the three pages.

To your info about the post-content block, when I use this post-content block, I can put anything in this block. I tried to move the section in the template file to the post-content block but that doesn’t work.


// Edit typo

Hello @dennis77,

I’m sorry for not getting back to this thread. I have been forwarded one of your mails by a team member.

The password protection is a native WordPress solution that applies to post content. This means that template blocks will be accessible whether or not the post itself has a password protection.
Thus, you will have to make sure that the blocks you want to protect from unauthorised access are included within the post and not the template/template part.

Hope that clears things up a little.

If I’m still misunderstanding, please don’t hesitate to let me know.


Thanks for getting back @Louis

But the intention is that the whole page//all blocks //whole template should not be accesible without password.

Similar question was asked here

Hello @dennis77,

I fully understand the intention, but if you want to stick with the WordPress password protection native feature, it’s important to understand that that is how it currently works (only applied to post content) without additional tweaks.