Support » Fixing WordPress » How can I check if I am logged in?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi…. anyone, please?

    OK, I surrender… 🙁

    It’s a bit of code with which some PHP developer can help you… I’d search for something in the code which will be like “If user logged in, then…”, then would re-use this bit of code to make your little bit of magic work 🙂

    Use trial and error 🙂 I am not so proficient in PHP as to help you easily… I’m afraid :-/

    PS OK, after a quick test, here’s what I came up with:

    if ( is_user_logged_in() ) {
      echo "(Put your stuff here! Like,
      (I would set up the link list here - no problems...)";

    You can modify it at your own ease, to suit your needs. I know this is not the best way to implement it, but it works. I checked, logged in and logged out, the “if” statement worked OK.

    Try it! 🙂

    My $ 0.02 🙂

    Hi lelion!

    Your code works – just the way I wanted it to work!

    The problem with my code was that I did not define $User_ID – you have to set it as a global variable and then use get_currentuserinfo(), as I have just found out.

    Anyway, your way is less complicated, and I will use that one. Thank you very much!

    You’re welcome!

    I’m glad my 0.01% ability to read PHP scripts helped in this case 😉

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How can I check if I am logged in?’ is closed to new replies.