setcookie() definitely not working (searched/read/tried everything)
-
hello.
googled everywhere, checked any relevant post on the support forum I could, tried everything, setcookie() used at the beginning, no whitespaces, var_dump(headers_sent()) false, etc.: setcookie() just doesn’t work.
or at last, it worked once, then reloading the page it just did not work anymore.
setcookie('my_cookie', time(), time()+(3600*24), COOKIEPATH, '.example.com', false);
I used time() as value to check that the cookie was actually set again as I reload the page, and here I replaced the real domain with example.com.
I need just a plain answer: is it intended as possible to set your own custom cookies on wordpress, yes or not?
if yes, what am I doing wrong?
well, that would be two plain answers, but I hope I’ll have them anyway.
many thanks.
- The topic ‘setcookie() definitely not working (searched/read/tried everything)’ is closed to new replies.