WordPress.org

Ready to get started?Download WordPress

Forums

Is user online or not (5 posts)

  1. levani01
    Member
    Posted 5 years ago #

    How can I show whether the user is online or not. Just like on message boards and web messengers add green button next to his name on single post page if the user is online and red button if he's offline (or something like this :) )

    Is it possible?
    Thanks

  2. Samuel B
    moderator
    Posted 5 years ago #

  3. levani01
    Member
    Posted 5 years ago #

    This plugin is really perfect but I don't want to show the list of all online users. I just want to show whether the post author is online or not on single post page.

  4. yu
    Member
    Posted 4 years ago #

    yeap, how could we check wheather user is online in some loop using user_id or not? quite a simple query i think..

  5. kz
    Member
    Posted 4 years ago #

    if(is_user_logged_in()) :
      global $current_user;
      get_currentuserinfo();
      echo $current_user->display_name;
      /* green button stuff here */
    else :
      /* offline stuff */
    endif;

Topic Closed

This topic has been closed to new replies.

About this Topic