Hi holsclaw,
I’d like do something similar, but am all confused with the scope of global variables. Could you pls share your code snippet?
Here’s what i’m doing:
1. I’m declaring a global var in my index.php, like this:
<?php
global $login_redirect_to; //// declare global var to store calling page
$login_redirect_to='blank';
?>
2. Then, trying to use it in my header.php, but am unable the fetch the value set in index.php
global $login_redirect_to;
echo 'a. Inside Header, value of login_redirect_to = ' . $login_redirect_to;
$login_redirect_to = get_permalink();
echo 'b. Inside Header, after setting, $login_redirect_to = ' . $login_redirect_to;
I need to reset this value (in header.php) and use further, but i’m stuck at the first step.
Thanks,
Shaguna