• I’m trying to open the login logout windows in a lightbox rather then a new page like this. I’m using:

    <?php wp_loginout(); ?>
    and
    <?php wp_register(); ?>

    In my theme’s index file.

    There are three problems, first I can’t figure out how to add the lightbox class to the link because it’s coded in php and I can’t even find the actual link to the wp-login.php. I need to put a class=”top_up” tag in the link for the link to open in a lightbox, but I’m not sure where to find the link.

    Second, how can I get the lightbox to only open when going to the LOGIN screen. I don’t want it to open when logging out and going back to the homepage, that would be just plain silly. Hope fully there are two separate links and I can add the lightbox tag to the wp-login.php and one and not to the logout one.

    Third, how can I get the bullet points to go away next to the login and register links. It’s like their supposed to be in the meta widget. I’m positioning them manually and must use options for the lightbox so I’ve got to use them outside the widget. How can I just get the link to show???

    My site for reference…

    Thanks!
    – MRNICEGUY

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    try it with wp_login_form

    <?php wp_login_form(); ?>

    Thread Starter MrNiceGuy2

    (@mrniceguy2)

    Where do I put the

    class="top_up" toptions=" type= iframe,"

    Woudl I write:

    <a class="top_up" toptions=" type= iframe," href="<?php wp_login_form(); ?>">Login ??</a>

    ?

    Thread Starter MrNiceGuy2

    (@mrniceguy2)

    Nope, that doesn’t work.

    I need to open wp-login.php in a lightbox. I don’t see why I’d have to link the form directly since somewhere there is a link or redirect to wp-login.php.

    I’m using topup.

    If I figure out how to do this I’ll surely have to make a plugin of it.

    Thread Starter MrNiceGuy2

    (@mrniceguy2)

    I should also note that the idea is to have a login link when logged out, and a log out link. The only way I can see of achieving this is through php. What php can I write that can achieve this? or how can I edit existing php within wordpress so that it uses:

    class="top_up" toptions=" type= iframe,"

    Thread Starter MrNiceGuy2

    (@mrniceguy2)

    bump

    Thread Starter MrNiceGuy2

    (@mrniceguy2)

    I’ve had this post open for a month, any help?

    Moderator keesiemeijer

    (@keesiemeijer)

    use wp_login_form(); to show a login form on a webpage and use javascript to hide it and show a link with a javascript event handler attached to it to show the form again when clicked

    Thread Starter MrNiceGuy2

    (@mrniceguy2)

    Then how would I get it to display “login” when logged out an d”logout” when I’m logged in? That’s the big problem. I’ve found how to make it open in a lightbox, but I still cannot apply the ability to show “login” one way and “logout” the other.

    Moderator keesiemeijer

    (@keesiemeijer)

    <?php
    if ( is_user_logged_in() ) {
        echo 'Welcome, registered user!';
    } else {
        echo 'Welcome, visitor!';
    };
    ?>
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Opening Login/Logout Widnow in a Lightbox’ is closed to new replies.