Support » Requests and Feedback » Post Passwords Don’t Work…

  • Can somebody explain to me how to get the passworded-posts function to work? It isn’t a cookie/cache issue because I’ve dumped those and the problem still persists.
    I can protect the posts but when I enter the password on the post itself the page refreshed but nothing changes. While I know there are several other threads regarding this issue I have seen no solutions, hence this post.
    Any help would be greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • gahazzah, is your index.php in a different folder than your WP folder?
    If so you’ll need to modify the wp-pass.php file that sets the cookie as follows:
    setcookie(‘wp-postpass_’.$cookiehash, $_POST[‘post_password’], time()+60*60*24*30, “/path/”);
    notice the extra “/path/”. this will be the path to your index.php file. so if your index.php is in your root dir it would be “/”. If it was in a dir named blog, it would be “/blog/”. and so on…
    Again this is assuming your index.php is in a different directory than your WP folder (wp-pass.php).

    Thread Starter gahazzah

    (@gahazzah)

    Thanks for the response MattRead,
    My index.php is in the main wp directory that wp was installed into (/public_html/wp/) and it is being called forward through a php-include so I can wrap it with a header and footer.
    I don’t intend to sound stupid but that might be invetibable with the following question…
    would I put the cookie pass as “/wp/”? I tried it and nothing. On the off-chance I also tried it as “/”.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post Passwords Don’t Work…’ is closed to new replies.