php - wp_get_referer store in session -


i need display text in header if user comes site1.com. have working 1 here current code:

<?php $referer = wp_get_referer(); if ( $referer == "http://site1.com" ) {    echo '<span class="referrer-display"> <a href="http://site1.com">return site1.com</a> </span></p>';  } else {    echo "";  } ?> 

the problem when user transfer page text removed. believe has session? please enlighten me or point me correct direction achieve want.

thank in advance.

referer gets removed because when click link, referer not same. referer page on clicked page. can keep referer data inside session preserve value.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -