I'm focusing on a WordPress site which has a static landing page using the wordpress plugin "SplashScreen".

The consumer can decide on two options:

A.) Enter their current email address within the form to go to the website.

B.) Click a hyperlink situated underneath the area which enables these to bypass giving their email.

Presently because it stands the consumer is come to a thanks page upon giving their email, where they are able to then click a hyperlink to obtain come to the house page. Or they're taken straight to the house page when they click on the bypass link. However, this only calculates well when they found site directly. When they found the website from the direct connect to a particular publish or page they're not going to be studied to the page they meant to view initially.

Things I am searching to complete is ask them to taken straight to that intended page upon completing the shape or by clicking the bypass link. I've looked everywhere with this and all sorts of I'm able to find is information about how to redirect a person to their intended page after signing in. I understand how to achieve that, this really is a little more complicated.

The landing page is a straightforward static HTML page that utilizes Javascript to create the snacks therefore the page only seems once:

function setCookie(name, value, expires, path, domain, secure) {
document.cookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");

function setsplash() {
var exp = new Date();
var expDays = 365;
exp.setTime(exp.getTime() + (expDays * 24 * 60 * 60 * 1000));
setCookie("splash", "1", exp, "/");


<input class="sub-btn-join" type="submit" value="" onclick="setsplash()">

I'm available to using whatever works, but Javascript or jQuery could be ideal. Hopefully among you are able to assist me about this. I've wasted considerable time about this.

This can be done in three steps:

  1. Temporarily keep user's URL request for the reason that same cookie. You will get the asked for URL with PHP http://$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; or JavaScript (document.URL).
  2. Handle the splash check as if you are already using the "splash" cookie.
  3. When the initially-attempted URL isn't the home/splash page, use PHP again to redirect into it.

        header( 'Location: http://www.example.com/the_page_we_first_wanted.html' ) ;

As I aren't seeing the code inside your question, that will redirect the consumer somewhere, you'll be able to redirect him towards the correct page by delivering a redirect-header using the new Location. The initial location might be read in the $_SERVER['HTTP_HOST'] and $_SERVER['REQUEST_URI']. These ought to be placed on the hyperlinks / target page from the redirect, which might mean you will need to edit the SplashScreen-Wordpress plugin to transmit this:

header('Location: '.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);

Keep in mind, that no headers might be send, when another content was already send.