Adding a Timer to Renewal
-
Does this plugin allow you to add a timer for the cookie to expire and renew?
I run a clothing company that releases a new design every week on Friday. I have a landing page that allows new users to understand more about my business & services, view the recent release, view the recent updates and also learn about the programs on my website.
I want to make the cookie expire every 7 days, so that even if you aren’t a “new” user to my website, you can still view the new releases & updates.
// Enabling cookies for landing page/homepage, renewal set for 1 week if (!isset($_COOKIE['firsttimevisit'])) { setcookie('firsttimevisit', 'no', 'time() + 60*60*24*7'); header('Location: https://www.the-vibe-tribe.com/shop'); exit(); } else { header('Location: https://www.the-vibe-tribe.com/landing'); exit(); }
this is the code I have placed into my functions.php file. I understand that this file is only for functionality of my website, but this is a function that is necessary to running my business. (it’s better than using pop-ups, because pop-ups can be blocked, redirects are inevitable)
Anyways, my issue is the fact that it bricks my website every time i add the code into the functions file. It really should not. I’m trying to find a solution for my problem, I’m hoping that this plugin can be that solution.
Hoping that your holidays were splendid! Also, hoping you get back to me ASAP haha
thanks,
Gabriel
- The topic ‘Adding a Timer to Renewal’ is closed to new replies.