use variables in php redirect?
-
I’m attempting write a bit of PHP in the template to perform a redirect – essentially, once users are logged in, they are redirected to (for example) site.com/staff/staffnamevariable – this is all working great.
However, what i’m attempting to do is to first check that the user is logged in already or not, using is_user_logged_in – from there running wp_redirect – to send the user, ideally back to their unique redirect address. (eg site.com/staff/staffnamevariable) so that the user is always pushed to their appropriate user page instead of being presented with the “you are already logged in” screen.
I’m unsure however, how to access this variable outside of the plugin.
- The topic ‘use variables in php redirect?’ is closed to new replies.