Is there anyway of checking if a password protected post is visible / not visible? I want some thing that says this;
If the post is password protected (that parts fine) and the correct password hasn't been entered, then show 'XXX', else show 'ZZZ'.
post_password_required()
: whether post requires password and correct password has been provided.
<?php
if ( post_password_required() ) {
echo 'xxx';
} else {
echo 'zzz';
}