Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Detecting all admins that are logged in

WordPress do not have a true concept of “logged in”. Although the labels all around use the term, in the code the closest you get is something that might be called “authenticated users”. The difference is that the authenticated user might be one that has his browser closed and therefor he is not “logged in”.

To do what you want you will first need to define what does it mean for you to be “logged in” and implement some logic to detect it. For example you might use ajax to update that a user is still connected and remove the user from the “logged in” list if it didn’t update for lets say 5 minutes.

It is not trivial but not very complex to implement.

Related Posts:

  1. Display sortable User meta column in admin panel user’s page
  2. Users disappeared from wp-admin
  3. define two login page url
  4. Login issue with subdomain installs
  5. Cannot login in WordPress even after changing hash password in phpmyadmin
  6. How to check if a user is in a specific role?
  7. Admin Page Redirect
  8. How to redirect/rewrite all /wp-login requests
  9. Custom login redirects to wp-admin on wrong password
  10. How to allow users login to WP from external domain and make REST requests
  11. How to display the user that published a pending post?
  12. Custom user role that can only edit specific (non-custom-type) page and all child pages [duplicate]
  13. Add a button to users.php
  14. Users are redirected to homepage instead of wp-admin
  15. How to move wp-admin login page to another location? [closed]
  16. How to display multiple custom columns in the wp-admin users.php?
  17. Adding body class to login page?
  18. Edit a WordPress site without the username and password?
  19. Removing user fields [duplicate]
  20. Change WP-Login or WP-Admin
  21. Users Unable to Access Dashboard/Posts/Pages
  22. I cannot log into my wordpress site with my wp-login.php [closed]
  23. Stop loading “collaborators” users on add new post or page?
  24. Distinguish profile user and admin user IDs / get ID of user being edited
  25. Uncheck the box “Send User Notification” by default on new-user.php
  26. Can’t login to Dashboard when changing site URL to HTTPS
  27. WordPress and bbPress Login conflicts?
  28. Subscribers become Authors after Upgrade? / Mass Update of Users?
  29. Stopping user deletion from running on error
  30. I want to disable login of admin (/wp-admin) with email and make it accessible only with username
  31. Website looks fine, but login to wp-admin yields a blank screen
  32. Filter dropdown in users.php “delete user” bulk edit screen
  33. cannot find the login page for local WordPress site
  34. Modify WP-Admin login fields
  35. display dynamic WP Site logo on wp-admin using CSS
  36. How to Change The WordPress Login URL Without Plugin
  37. wp-admin – 404 after custom login form
  38. How to fix ‘WordPress redirection loop problem in wp-login.php page’?
  39. Logging into sandbox subdomain WP
  40. 404 redirect wp-login and wp-admin after changing login url [closed]
  41. Logout USER form backoffice after 30 minutes of inactivity [closed]
  42. Having troubles connecting to WordPress login page using Mamp
  43. Sorry, you are not allowed to access this page
  44. WP Admin/ WP Login Redirect to themselves
  45. WP admin user search doesn’t return all users
  46. Hide username discovery
  47. Cookie Domain is preventing Admin login
  48. Cannot access WordPress login pages
  49. How to get Role Subscribe Users on Admin Menu only in Pages in WordPress
  50. Cant login to wp-admin
  51. I accidentally deleted an admin user and all their content is now gone from the site. [closed]
  52. /wp-admin/ doesn’t work but /admin/ does
  53. Restrict submitters from wp-admin [duplicate]
  54. Why am I locked out of the system?
  55. Why can I log into wp-login.php and not wp-admin.php?
  56. Disable Admin CP authentication (or auto login)
  57. firing function at login within class
  58. WP-admin or any other is redirecting me to (This page doesn’t seem to exist.)
  59. How to allow WordPress updates to only one specific administrator?
  60. wp-login not found – All usual solutions not working
  61. Is there a filter to edit html of user-edit.php
  62. Create new user from phpMyAdmin
  63. GoDaddy hosting wp-admin problem
  64. How do I make it so that the all users page is not a white screen?
  65. WP Admin Login keeps redirecting to login
  66. CPU overload spam – redirect link to wp-admin and new post
  67. Newly created user role not displaying on users screen
  68. How to check if a user is in a specific role?
  69. On Users (user.php) in wp-admin disable/hide “Bulk Actions” and “Change Role To”
  70. How can I can I make changes to a WP project I pulled from GItHub?
  71. WordPress Admin Login Issue
  72. How to log into WordPress via GET/POST
  73. Hook into form handle from admin users table
  74. restrict admin panel sections to users
  75. wp-login.php entering password nothing happens
  76. Trying to login to my site redirects me to the first page
  77. CSRF attack to create USER
  78. stop customize.php redirect to login page if admin is not logged in
  79. Admin Login Checks
  80. WordPress logged in but no access to wp-admin
  81. Changed the path to wp-login and now can’t access WPress dashboard
  82. Why my login panel has a wrong language?
  83. Handling multiple account logins?
  84. How to keep the plugin submenu open on viewing a custom version of users.php?
  85. WordPress Login for multiple sites
  86. Can’t log into WordPress after domain change
  87. is_admin() conditional statement
  88. Admin Login page not working at all
  89. Anyone Can Register
  90. Impossible User Registration
  91. Couple questions about .htaccess, login page, updates
  92. Is it possible to tell if a user is logged into WordPress from looking at the cookies which are set?
  93. Extend user search in the users.php page to allow for searching by role and excluding specified email domains from the “users search” input box
  94. After Upgrade: $user becomes unknown (id: 0) after successful login?
  95. Redirect users based on their roles, is_admin()
  96. Searching for a custom meta from user.php in the admin
  97. WordPress site shows a white page for site/wp_admin. A login returns again to the login screen
  98. Can a user submit requests to wp-admin/admin.php without logging in?
  99. Admin access to secondary site user_can_access_admin_page losing login
  100. login_enqueue_scripts changes are not reflecting
Categories wp-admin Tags login, users, wp-admin
Can we allow users to choose front page from theme options?
Change size and crop medium_large images

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress