• Resolved durangod2

    (@durangod2)


    Hi, i am trying to do something like this in a text widget.

    <?php
    if(is_user_logged_in())
    { ?>
    
    <a href="https://webpage.usplayersonly.x10host.com/wp-login.php?action=logout">Logout</a>
    
    <br />
    
    <?php
    }else{
    ?>
    
    <a href="https://webpage.usplayersonly.x10host.com/wp-login.php">Login</a>
    
    <br />
    
    <a href="https://webpage.usplayersonly.x10host.com/wp-login.php?action=register">Register</a>
    
    <?php
    }
    ?>

    its not working, am i doing something wrong in the widget?

    thanks ??

    https://www.ads-software.com/plugins/php-code-widget/

Viewing 1 replies (of 1 total)
  • Thread Starter durangod2

    (@durangod2)

    Nevermind i got it, i did not know it created a php widget to use for this. I just happen to find another article in my search talking about this php widget and so i decided to look to see if i had one and there it was.

    I was using a plain text widget. The words “creates a new widget” would have been helpful in the description lol ?? But then again im a wp noob.

    Thanks for a nice plugin ??

Viewing 1 replies (of 1 total)
  • The topic ‘using if logged in function’ is closed to new replies.