WordPress.org

Ready to get started?Download WordPress

Forums

Logout Redirect with URL parameter (1 post)

  1. Andrew
    Member
    Posted 2 years ago #

    Hi Folks,
    I've created a 3.0 custom menu to handle a some secondary navigation available for logged in users. In the menu, I have called the following URL for login

    http://www.naada.ca/wp-login.php?redirect_to=http://www.naada.ca

    After the user logs in, they get redirected to homepage. Awesome!
    BUT I need something similar for logging out.

    I've tried this..

    http://www.naada.ca/wp-login.php?action=logout&redirect_to=http://www.naada.ca

    But this brings me to a page which says 'Are you sure you want to log out?' and the available link 'log out' doesn't contain the same redirect taking you back to the homepage. Other than altering the core (wp-login.php) is there another way to do this? Should the above URL parameters work? I found it here..

    I know how to do this in PHP within the template, but I need to call it from a Custom Menu, so that's to say just from a simple URL.

    Thanks in advance!

Topic Closed

This topic has been closed to new replies.

About this Topic