Password protecting a wordpress page , post and you need to re-enter password every time

The Problem is : I have set a password for a static page/post in my wordpress blog. I need to ensure that the information should be protected.

The solution is “Visibility:Password protected” : In the editor window where you are typing the page content, look at the top right section called PUBLISH. In that section look at the text visibility: Public, click on Edit, then choose “Password protected” radio button.

Visibility: PRIVATE – Then there is an option called private in the top right section, which will only show the post to users with Administrator and Editor user level.

Also I want to know that – is there a process where a user needs to logout, or requires to enter password again.

The solution is :

in the wp-pass.php file look for the following line of code:

setcookie(‘wp-postpass_’ . COOKIEHASH, $_POST[‘post_password’], time() + 864000, COOKIEPATH);

Here the 86400 is the number of seconds, for which period the cookie will be active.

If you only want the cookie to be active for 10 minutes, change 864000 to 600