Viewing 4 replies - 1 through 4 (of 4 total)
  • nope, I do use a js popup box though. It degrades nicely, if the browser doesnt have js enabled, the regular page is displayed.

    I have gotten a login box using thickbox using this code:
    < a href=”https://www.<domain&gt;.net/wp-login.php?height=475&width=600&modal=true” class=”thickbox”>Login< /a>
    What i would like to have happen from here is have the “Login” link, once someone is logged in, to change to “Logout”. I have tried using < ?php wp_loginout(); ? > with the thickbox but this would not display the login page. How do i change “Login” to “Logout” once someone has logged in?

    Thread Starter HM

    (@hcm)

    Maybe something like this?

    <?php global $user_login, $user_identity;
    get_currentuserinfo();
    if ($user_login) {
    echo "<a href=\"https://www.<domain>.net/wp-login.php?action=logout\">Logout< /a>";
    } else {
    echo "<a href=\"https://www.<domain>.net/wp-login.php?height=475&width=600&modal=true\" class=\"thickbox\">Login< /a>";
    }
    ?>

    I’ve been trying for hours to get something to work. The problem with carnold’s solution (and hcm’s for that matter) is that after the login, the page redirects to the admin panel, defeating the entire purpose of thickbox. Is there a way to have it redirect back to the current page? For example, I love the way the AJAX Login plugin works, but I don’t want the widget. So, if I could get the function of AJAX Login put into a thickbox, I’d be thrilled.

    And I’m not tied to thickbox, but it seems the best way to go. If, however, Whooami wanted to share his knowledge, I’d be interested.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Thickbox and WP login’ is closed to new replies.