• Ok, I’m completely fine with the login and the scripting, but I wanted to know how I would go about having the page display a small 30 x 30 gif file instead of the text Login or Logout (I have small graphics for both login and logout, I’m just not sure how to get the code to cooperate). Any help would be greatly appreciated.

    Placing the tags within the HTML that would regularly be correct for an image hyperlink doesn’t seem to work, and my guess is that it’s related to the login and logout being coded in PHP and within “<>”. If you need any more clarification I would be glad to provide it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • <a href="/wp-login.php"><img src="button-in.jpg" alt="login" /></a>
    <a href="/wp-login.php?action=logout"><img src="button-out.jpg" alt="logout" /></a>

    would work ? and you could put conditional tags around it depending on the condition?

    try this:
    <?php
    global $user_ID;
    get_currentuserinfo();
    if(” == $user_ID){
    ?>
    <img src=”button-in.jpg” alt=”login” />
    <?php }else{ ?>
    <img src=”button-out.jpg” alt=”logout” />
    <?php } ?>

    Thread Starter insidemeyousee

    (@insidemeyousee)

    Thank you very much podz, your code worked out fine.

    And I tested the PHP driven one, but it wasn’t clickable. So I will use the code that worked, but thank you for trying gornik321. However, another problem arose. Clicking on either button creates this error:

    Not Found
    The requested URL /wp-login.php was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    Thread Starter insidemeyousee

    (@insidemeyousee)

    Oh, I forgot to specify it was in a subfolder, since I placed WordPress into a seperate folder, as installation suggested to.

    LOL, what a clutz.

    sorry I forgot to add the link code:

    <?php
    global $user_ID;
    get_currentuserinfo();
    if('' == $user_ID){
    ?>
    <a href="/wp-login.php"><img src="button-in.jpg" alt="login" /></a>
    <?php }else{ ?>
    <a href="/wp-login.php?action=logout"><img src="button-out.jpg" alt="logout" /></a>
    <?php } ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘All I want is a login button.’ is closed to new replies.