• Hi there, I’ve been looking into password protected posts and I have a question that doesn’t seem to be answered anyway, nor in the WordPress Core itself either.

    post_password_required() is the function for checking if a post is password protected or not. However this only returns as true if the password has not been entered. How do you check if the post is password protected and the password has been entered correctly?

    I’ve checked the Codex and done some searching and can’t find the answer anywhere! Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey @danieltj. Did you figure out a solution to this? I’m trying to figure out the exact same thing but can’t find anything short of checking the password cookie myself. It seems like a real oversight that post_password_required() doesn’t provide any sign of whether the user authenticated correctly.

    Thread Starter danieltj

    (@danieltj)

    Sorry, still not figured this out.

    There must be something to check against but so far nothing in the Codex or Developer guide has suggested what it may be.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Check if password protected and password entered’ is closed to new replies.