Add session to wp_get_referer()
-
Good day,
I am having trouble adding a session to wp_get_referer().
Here is my current code:
<?php // use the WordPress tag wp_get_referer to assign the referring URL to the variable $referer $referer = wp_get_referer(); $_Session // check if the URL is a specific one if ( $referer == "https://site1.com" ) { echo '<span class="referrer-display"> <a href="itmsitedev.com/scol">RETURN TO YOGA FOR SCOLIOSIS</a> </span></p>'; } else { echo ""; } ?>
It is currently working but when the user transfer to another page or refresh the page the text disappear. I want it to store it in a session. Can someone point me to the right direction thanks a lot.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add session to wp_get_referer()’ is closed to new replies.