ישנה פונקציה מובנית בוורדפרס שמאפשרת להגן על תוכן פוסט או עמוד עם סיסמה
post_password_required()
דוגמה לקוד
<?php if ( post_password_required() ) { ?>
<form method="post" action="/wp-login.php?action=postpass">
<p>This content is password protected. To view it please enter your password below:</p>
<input type="password" style="margin:10px 0;" size="20" id="pwbox-<?php the_ID(); ?>" name="post_password"/></label><br/>
<input type="submit" value="Submit" name="Submit"/></p>
</form>
<?php } else { ?>
// echo out all of the post content
<?php } ?>