I am Looking to append URL Parameter to all URLs
I don’t know if you still need the answer, but here’s working example for you. Header.php /*SAVE $_GET[‘aff’] TO COOKIE*/ if(!isset($_SESSION[‘aff’]) and $_GET[‘aff’]){ $cookie_expire = time()+60*60*24*30; $_SESSION[‘aff’] = $_GET[‘aff’]; setcookie(‘aff’, $_SESSION[‘aff’], $cookie_expire, “https://wordpress.stackexchange.com/”, ‘.’.$_SERVER[‘HTTP_HOST’]); } Functions.php – if you need to pass one parameter /*APPEND ‘aff’ PARAMETER IN URL THROUGH WHOLE SITE*/ function wprdcv_param_redirect(){ if(isset($_COOKIE[‘aff’]) … Read more