Redirection After Login
-
Hi,
I have some problems with the redirection codings. I set the code such a way that it will redirect me to the current page I am in. It works for other pages, except for the frontpage. Whenever I login from the frontpage, it redirects me to my latest post. My coding is as follows:<?php if ( is_user_logged_in() ) : ?> <p style="margin-left:12px;">Welcome back, <?php global $current_user; get_currentuserinfo(); echo '' . $current_user->user_login . "\n"; ?> | <a href="<?php echo wp_logout_url().'&action=logout&redirect_to='.$_SERVER['REQUEST_URI']; ?>" title="Log out of this account">Logout</a></p> <?php else : ?> <p style="margin-left:12px;"><a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo get_option('siteurl'); ?>" class="simplemodal-login">Login</a> | <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=register" class="simplemodal-register">Register</a></p> <?php endif; ?>
For your information, I’m using Simplemodal Login and SimpleCaptcha for ease of access. Please do assist.
Regards,
Sean
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Redirection After Login’ is closed to new replies.