Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

Linesofcode on "Clear cookie of posts password protected"

$
0
0

I'm sorry if this isn't the right section of the forum to publish this topic.

I'd like to create a page just to reset cookie.
I tried to create a page: unset.php, I put the page inside the wp-content\themes\mytheme\, with this code:

<?php setcookie("wp-postpass_", "", time()-3600);
unset($_COOKIE["wp-postpass_"]); ?>

Then, I would like to call this way:

<form method="post" action="unset.php">
  <input type="submit" value="logout"/>
<form>

Or even
<a href="/unset.php">Logout</a>

But it's not working. Any ideias? Thanks!


Viewing all articles
Browse latest Browse all 8245

Trending Articles