Support » Developing with WordPress » Custom Re-directing

Viewing 2 replies - 1 through 2 (of 2 total)
  • ‘PHP_SELF’ is bad here because it refers to the current PHP document, which in this case would be wp-login.php.

    Instead of editing wp-login, here’s an example of the login link I have in my sidebar (only I use it to logout):

    <li><a href="<?php echo get_settings('siteurl') . '/wp-login.php?redirect_to=' . $_SERVER['REQUEST_URI']; ?>">Log Out</a></li>

    Thanks for this…I think this is a good workaround.

    However, is there a problem with updating wp-login?

    I’d like to be able to use the “meta” widget instead of custom creating this login feature.

    Also, as a clarification, I used PHP_SELF on the previous page, not on wp-login.

    So the session variable $_SESSION[‘variable’] is set to the previous page not wp-login.

    The question is if I can simply update wp-login to go to the previous page using this session variable. Is this possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Re-directing’ is closed to new replies.