I have a page that is password protected, and I wish to removed some parts of the theme, and add others. Can I do that? Is there a check I can do in the theme files to see if a user has entered the password or not?
1 Answer
Just use the post_password_required()
conditional:
<?php
if ( post_password_required() ) {
// Post is password-protected; do something
} else {
// Post is NOT password-protected; do something else
}
?>