I think you should add an entry in database when admin log in and can remove or update that entry when user logout.
there might be a situation when admin leave website without logged out for that you can set time for auto logout.
I don’t think there is a way to find out if admin is login or not from somewhere in wordpress.
you just check if login user is admin or not.
Related Posts:
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- How to export comments in WordPress?
- How to eliminate weird 404 errors in wp-admin?
- How to stop showing admin notice after close button has been clicked
- WordPress Admin is displaying Not Available
- Is there any record of installed plugins in the database?
- Add content to /wp-admin/plugin-install.php admin screens
- Best way to manage a lot of pages in Wp Admin [closed]
- Plugin: How to make links in admin page open up inside of the admin panel
- How to remove/hide action links cluttering under specific plugins’ names
- How do I add to the list table a filter?
- Getting Custom Post Type content from main-site of a Multisite
- Adding Visibility Options
- How Restrict access to admin dashboard by specific static ip?
- Questions about brute force attacks on the admin username, coming from amazon IP addresses
- Why would WP-CLI and WP Admin show different list of plugins with updates?
- How could I execute my plugin just in frontend (not in backend)
- Can’t see login page after migration
- Custom height/width for thickbox in WP Backend
- Hide Theme options and Customize Admin menu
- Making menu link open in new tab?
- After activating a Plugin, /wp-admin is no longer accessible
- How can I create a plugin installation link?
- Cannot access wp-admin after disabling all plugin
- Function to prevent users from trashing comments
- How to provide a plugin which requires CMB2 (plugin dependencies)?
- Plugin upload to install
- WordPress takes too much time (100 seconds) to load – Front end and back end
- WordPress on AWS with ELB
- Change the backend language of a single plugin
- Edit default comments page in WP Admin
- Rotating background images with admin options
- Is there an easy way to flag posts in the admin area?
- Show an image in my header.php
- Facebook Messager Plugin
- Is it possible make a back-end for WordPress with WordPress?
- Create tabs in admin options page from custom post type loop
- Dynamic admin submenu
- Remove ‘Check Compatibility’ from Plugins menu
- Add menu page issues (permissions & position)
- Cannot access my wp-admin after installing Gzip compression [closed]
- Add sub menu page in your plugin
- Plugin settings won’t save changes
- Is there any way to make myself an admin?
- Full list of registered scripts or styles, but from an admin options page
- How can i force wp-admin to use 2-column dashboard layout? [closed]
- Odd /wp-admin/admin-ajax.php entries showing in Wassup
- How can I modify page content in the admin panel?
- How to display terms and conditions in post area?
- Is there a plugin for WordPress for creating ‘Accounts’ where all users who belong to that Account can only see Account data? [closed]
- WordPress Site is Broken, Cannot see wp-admin page [closed]
- getting notifications about updates only in the “core” page
- How to remove a CPT Menu from the Root Admin only
- Remove value from array within post meta ajax admin
- Is there a better way of handling AJAX requests in WordPress?
- Get access to WordPress when logged out
- Cannot access WP admin because plugin returns 204
- Install old version of plugin from admin panel?
- Edit page header on a custom plugin
- 404 errors when updating options in admin dashboard
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, function
- Can we hide a certain user in WP?
- Calling PHP function with AJAX
- How to properly enqueue jQuery knob on WordPress without conflict?
- WordPress Dashboard add user password not working, etc
- Add custom WordPress admin page with pretty url via code
- How to find where an image is used by it’s url
- Admin menu hilighting wrong item for CPT
- Store admin page into variable
- Not able to upload Plugins/ Theme from Admin backend
- Why does WordPress use cookies for /wp-admin and /wp-content/plugins for non-admin users [duplicate]
- Continous audio play in pages
- Disable default posts (Posts,Pages,Comments and Media) in wp-admin
- wp-admin will not redirect to wp-login.php
- How to add php stylesheet to admin section instead of admin_head hook
- Getting 404 page not found error while trying to access add new plugin / themes
- getpost content with all formatting for admin pages
- Plugin (smart archives reloaded) crashed site / no access on admin panel
- Which filters or actions involve with index page for plugin?
- How to activate/deactivate menu tab and keep the same id?
- Making plugin to use different table prefix cause permission problem
- Add custom fields in the new and edit the site forms without touching the WP core
- Gutenberg: Dynamic Block – Show saved data in the editor
- Screen Options drop-down does not show
- ERROR: Cookies are blocked due to unexpected output – no access to FTP
- Mixed content warning on doctype in admin
- Child Plugin Admin Panel
- Ajax in wordpress [duplicate]
- Notifications Bar on home page only
- List all posts in a particular page [closed]
- plugin translations not reflected in admin dashboard
- Allow direct access to files/folders within WordPress to replace wp-admin
- The Admin page isn’t showing in the sidebar of the dashboard
- Submitting form to admin-post.php WordPress
- Stop the user if login from the cookies
- Fatal Error in my WP “Call to undefined function get_option()”
- Secure way to add JS Script to WordPress filesystem
- Not applying update field (acf) in my plugin
- Plugin for better Backend Search? [closed]
- Show only those pages that are created by the specific logged in user in WordPress