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

AkivaWP on "managing cookies for a specific page"

$
0
0

Hi
I'm trying to do something like this:
I want every first time visitor to my site to be redirected to a registration page(for a mailing list, not site registration) and after the registration to be redirected to a thankyou page where a cookie will be set to prevent this process to happen on the next visit to my site.

I created a function for creating a cookie if it doesn't exist in the functions.php file and I also call it there.

Here are the problems I still have:
1. I want the cookie to be set only in the thankyou page. I tried doing it with a condition in the function "is_page(3)" but the page id is not loaded yet when functions.php is loaded.

2. Maybe this is a beginners question: how do I redirect to another page from within the wordpress page?

*The redirection from the registarion to the thankyou page are done automatically by the mailing list registration butoon so I don't need to do anything there.

Thanks in advance
Akiva


Viewing all articles
Browse latest Browse all 8245

Trending Articles