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. WordPress change role from administrator to author by itself (automatically)
  7. How to check if a user is in a specific role?
  8. How to restrict dashboard access to Admins only?
  9. Admin Page Redirect
  10. How to redirect/rewrite all /wp-login requests
  11. Check if user is admin by user ID
  12. Unable to login to my wordpress site. reauth=1 redirection loop
  13. Custom login redirects to wp-admin on wrong password
  14. How to allow users login to WP from external domain and make REST requests
  15. How to display the user that published a pending post?
  16. Custom user role that can only edit specific (non-custom-type) page and all child pages [duplicate]
  17. Add a button to users.php
  18. create users to site with specific language
  19. Users are redirected to homepage instead of wp-admin
  20. How to move wp-admin login page to another location? [closed]
  21. Can’t access admin dashboard with wp-admin without /index.php after it
  22. How to display multiple custom columns in the wp-admin users.php?
  23. Hooking into register_admin_color_schemes
  24. Adding body class to login page?
  25. Edit a WordPress site without the username and password?
  26. comment_form – show all fields when logged in
  27. Removing user fields [duplicate]
  28. Using /wp-admin works, using /login gives a 404. Why?
  29. Cannot log into WordPress Dashboard after removing/adding .htaccess
  30. Change WP-Login or WP-Admin
  31. wp-admin edit user url wont show up correct url [closed]
  32. Users Unable to Access Dashboard/Posts/Pages
  33. I cannot log into my wordpress site with my wp-login.php [closed]
  34. Stop loading “collaborators” users on add new post or page?
  35. How do I set the homepage to the WordPress Admin Dashboard login?
  36. Distinguish profile user and admin user IDs / get ID of user being edited
  37. Can’t access WordPress as an admin – but I can log in as a user!
  38. Uncheck the box “Send User Notification” by default on new-user.php
  39. Today, without warning, all admin panel logins redirect to home page after login. non-admin users logins work well
  40. Can’t login to Dashboard when changing site URL to HTTPS
  41. WordPress and bbPress Login conflicts?
  42. Subscribers become Authors after Upgrade? / Mass Update of Users?
  43. Stopping user deletion from running on error
  44. I want to disable login of admin (/wp-admin) with email and make it accessible only with username
  45. Website looks fine, but login to wp-admin yields a blank screen
  46. Filter dropdown in users.php “delete user” bulk edit screen
  47. Add count for new registered user in Users tab
  48. cannot find the login page for local WordPress site
  49. Modify WP-Admin login fields
  50. display dynamic WP Site logo on wp-admin using CSS
  51. How to Change The WordPress Login URL Without Plugin
  52. wp-admin – 404 after custom login form
  53. How to fix ‘WordPress redirection loop problem in wp-login.php page’?
  54. Logging into sandbox subdomain WP
  55. 404 redirect wp-login and wp-admin after changing login url [closed]
  56. Logout USER form backoffice after 30 minutes of inactivity [closed]
  57. Having troubles connecting to WordPress login page using Mamp
  58. Sorry, you are not allowed to access this page
  59. WP Admin/ WP Login Redirect to themselves
  60. WP admin user search doesn’t return all users
  61. Hide username discovery
  62. Cookie Domain is preventing Admin login
  63. Require Login Redirect to Login Page
  64. Cannot access WordPress login pages
  65. How to get Role Subscribe Users on Admin Menu only in Pages in WordPress
  66. Cant login to wp-admin
  67. I accidentally deleted an admin user and all their content is now gone from the site. [closed]
  68. /wp-admin/ doesn’t work but /admin/ does
  69. Restrict submitters from wp-admin [duplicate]
  70. Why am I locked out of the system?
  71. Why can I log into wp-login.php and not wp-admin.php?
  72. Disable Admin CP authentication (or auto login)
  73. firing function at login within class
  74. WP-admin or any other is redirecting me to (This page doesn’t seem to exist.)
  75. Nickname field isn’t appearing in Admin
  76. How to allow WordPress updates to only one specific administrator?
  77. wp-login not found – All usual solutions not working
  78. how can provide access to wp_admin page for non wp_users?
  79. Is there a filter to edit html of user-edit.php
  80. Can’t connect to WP-Admin, blank error message
  81. Create new user from phpMyAdmin
  82. Blank page when viewing wp-admin
  83. GoDaddy hosting wp-admin problem
  84. How do I make it so that the all users page is not a white screen?
  85. WP Admin Login keeps redirecting to login
  86. CPU overload spam – redirect link to wp-admin and new post
  87. Newly created user role not displaying on users screen
  88. How to check if a user is in a specific role?
  89. On Users (user.php) in wp-admin disable/hide “Bulk Actions” and “Change Role To”
  90. How can I can I make changes to a WP project I pulled from GItHub?
  91. WordPress Admin Login Issue
  92. How to log into WordPress via GET/POST
  93. Hook into form handle from admin users table
  94. restrict admin panel sections to users
  95. wp-login.php entering password nothing happens
  96. Trying to login to my site redirects me to the first page
  97. CSRF attack to create USER
  98. stop customize.php redirect to login page if admin is not logged in
  99. Admin Login Checks
  100. WordPress logged in but no access to wp-admin
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
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 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