I added the following to the child-theme functions.php
///time out login so you must reenter it every time//
add_action( 'wp', 'post_pw_sess_expire' );
function post_pw_sess_expire() {
if ( isset( $_COOKIE['wp-postpass_' . COOKIEHASH] ) )
// Setting a time of 0 in setcookie() forces the cookie to expire with the session
setcookie('wp-postpass_' . COOKIEHASH, $_COOKIE['wp-postpass_' . COOKIEHASH], time() + 1 * 5, COOKIEPATH);
}
I replaced
setcookie('wp-postpass_' . COOKIEHASH, '', 0, COOKIEPATH);
with
setcookie('wp-postpass_' . COOKIEHASH, $_COOKIE['wp-postpass_' . COOKIEHASH], time() + 1 * 5, COOKIEPATH);
so that you must reenter the password after one minute on the page/per session.
If I open Chrome, go to the page, I go to http://happynick.com/marketing/extra/private/ and type "private" to enter page.
When I "Clear Browsing Data" and go back to http://happynick.com/marketing/extra/private/, I am asked to enter "private" each time. Great. But if I go back to the page without closing Chrome, I can still access the page WITHOUT being asked to enter the password.
In Firefox, I can access it without entering the password again, even after closing Firefox and clearing going to Preferences > Advanced > Cached Web Content > Clear now.