check if post is set to “password protected”
There’s two main ways: You can use the post_password_required() function. This function returns true if the post has a password and false if the post doesn’t have a password, but it also returns false if the post had a password but the user has entered it and unlocked the post. You can get the post … Read more