Forums

Comments not readable/writable in password-protected post (4 posts)

  1. bookyeti
    Member
    Posted 4 years ago #

    Hello all, I'm hoping someone can help me out.
    I recently made a post which I've password-protected, and yet even when I'm logged in and have entered the post's password, it's not showing the comment submission box.

    All that shows is the text: "Enter your password to view comments."

    The comment counter says they are 7 comments, and yet I can't read them from my blog...but yet I can read them from the comment admin panel.

    Is this a problem someone has come across. I've searched the support database but haven't found anything that has dealt with this problem. Could someone help?

  2. bookyeti
    Member
    Posted 4 years ago #

    So...it seems as though others (who have the protected post password) can read and comment, but I can neither read or add comments to my post. How odd!

    Anyone?

  3. bookyeti
    Member
    Posted 4 years ago #

    Still haven't solved the mystery...
    Has anyone come across a similar problem?

  4. wordpress_org@dsbailey.com
    Member
    Posted 3 years ago #

    In your comments.php file of your theme, try changing $cookiehash to COOKIEHASH as below.

    From:
    if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie?>

    To:
    if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie?>

Topic Closed

This topic has been closed to new replies.

About this Topic