How to implement a $_SESSION alternative in WordPress inside a theme without a plugin?
You can just use a cookie, like you’ve attempted. The problem is that your logic is continuously adding the cookie. This is because setcookie(‘pxpop’, false, 0); is removing the cookie from the user, so you end up in a loop. This is your code’s logic: IF user does not have a cookie give the user … Read more