Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress check if page is password protected

//post id is optional
if(post_password_required($post_id)) {}
//or
if(!empty($post->post_password)){
   // do some stuff
}
 
PREVIOUS NEXT
Tagged: #wordpress #check #page #password #protected
ADD COMMENT
Topic
Name
8+3 =