post_password_required() not working
-
Hi all,
I have added custom fields to the Media area of WP to add a password to an attachment (working), but when I enter the password WP is telling me that the the password is still required.
$wp_password_required = post_password_required($post->ID); if($wp_password_required) : echo get_the_password_form(); else : get_template_part( 'loop', 'attachment' ); endif;
I’ve looked in the
$_COOKIE
variable, and the correct password is being assigned to thewp-postpass_####
key, but for some reason it does not like what is in there.Am I doing something wrong?
Thanks.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘post_password_required() not working’ is closed to new replies.