For reason unbeknownst to me (I’m not the original developer). This custom WordPress site doesn’t show the password protected login form…”This content is password protected! To view it please enter your password below:”.
The page shows it’s protected, but visitors can still see the full page. I manage to use the code that works that triggers the form and block access.
After entering the correct password. The page redirects to /wp-login.php?action=postpass which is just a blank page. From all the solutions I’ve tried in functions.php and editing the code below doesn’t seem to work. Has anyone have a similar issue or fix that redirects to same sage to show the protective content?
<?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 } ?>