Deleted all cookies on wordpress.com now I am getting logged out
-
I wanted to delete all cookies on my wordpress.com website so that one of my popups should continue appearing. This is the code that I wrote in my function.php file:
if (isset($_SERVER['HTTP_COOKIE'])) { $cookies = explode(';', $_SERVER['HTTP_COOKIE']); foreach($cookies as $cookie) { $parts = explode('=', $cookie); $name = trim($parts[0]); setcookie($name, '', 3600000); setcookie($name, '', 3600000, '/'); } }After I saved this I kept on getting logged out of WordPress because I had deleted all my cookies.
I tried removing it from functions.php and saving the file but then I received the following errors:
Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP.or:
nonce_failureI have tried searching in WordPress blogs but have not found anything, any help would be appreciated.
-
Hello hello!
As regular WordPress.com websites don’t let users access the functions.php file, it seems that your website is not hosted by WordPress.com, but is rather using the open-source self-hosted version of WordPress.
As the WordPress.com forums are specifically equipped to support websites hosted by WordPress.com, you’ll have to seek aid at the WordPress.org forums:
https://wordpress.org/support/forums
https://wordpress.org/support/Best of luck!
- The topic ‘Deleted all cookies on wordpress.com now I am getting logged out’ is closed to new replies.