You can show admin notices via the admin_notices
action. You can display it for a specific user by checking the contents of the global $current_user
:
function wpa80367_admin_notice() {
global $current_user;
if ( 'someusername' == $current_user->user_login ):
echo '<div class="updated"><p>';
echo 'This is an admin notice just for you, someusername.';
echo '</p></div>';
endif;
}
add_action( 'admin_notices', 'wpa80367_admin_notice' );
You could also extend this by saving per-user notices as user metadata via add_user_meta
, then checking if a user has a notice in the above function via get_user_meta
.
Another option is to display messages in a Dashboard Widget rather than admin notice.
Related Posts:
- Setting admin edit panels & metaboxes positions and visibility for ALL users and admins
- Can an admin check passwords of registered users?
- How to disable the “Your site has updated to WordPress x.y.z” admin email?
- How to obtain the user ID of the current profile being edited in WP-Admin?
- Showing WP_Error message with admin_notice action hook
- Hide update messages from non-admin users?
- How to remove “Super Admin” from All Users for those that are not a “Super Admin”?
- Add extra field when admin create user
- Add a custom column in users list page
- Customize Admin Users Screen based on Role
- Make certain pages uneditable by editors?
- wp-admin: Sort users by surname
- Add User meta fields, which only admin can edit
- How to display only logged in user’s post comments in comments area
- Add Admin User via SQL
- Can you have the users list pre sorted by specific column?
- How to remove Gravatar from Username column
- How do I enable new account notification emails (to the administrator)?
- In administration, how do I display comments of a certain user?
- New users must comment when requesting username
- user-new.php less detailed after WP3.1; how to revert?
- $user_id vs. is_user_logged_in()
- Get current logged in user under 3.1, re: remove “Howdy”
- Manage users custom column add class “num”
- Hide one admin from another admin
- Edit Auto Update Admin Notification
- How can I make the user names of commentors clickable links to the user’s profile from the admin comment screen?
- Keep Logged in Users out of Admin Panel
- Getting admin notices to appear after page refresh
- Shared account / dual blogging in WordPress
- I’m a super admin and I want to give an admin the ability to add new users…?
- Redirect admin 403 “Cheatin uh?” admin pages
- Given multiple admin accounts, how can I make it so that only admin with X username can edit posts
- How should I setup the “Users” area to hand over to a client?
- Want to know who is login Admin/User
- Control Users listed in Users List on dashboard
- How should I change the username of or delete the admin user?
- Prevent Registration Where Role is None?
- Extending the user profile [closed]
- Hide top admin panel for non admin and non editors
- When admin approves a registered user, I don’t want to send a notification email to users
- Is it possible to create a custom admin page for users?
- Custom redirection when managing users in admin
- Different role for free and pro users in wordpress without using bbpress
- How to disable the “Your site has updated to WordPress x.y.z” admin email?
- New User Notification – Setting Email
- You do not have permission to access this document on form submit
- Add a user to edit the layout of a site
- how to know if admin is in edit page or post [duplicate]
- How to remove entire admin menu?
- How can I target WordPress 3.8 new interface MP6 with CSS?
- How can ‘admin_email’ be set?
- How to change WordPress default strings?
- Remove ability to access certain admin menus
- Gutenberg “Add Block” button is not active (greyed out), cannot add new blocks
- How To View Site from Non-Logged-In User’s Perspective
- Daily notices of failed login attempts for non-existent admin user
- Wrong url in sortable column headers & pagination in the admin, when behind a proxy
- Reference external file as a function
- Is it possible to hook AJAX to UPDATE-button?
- Check if user is logged in else login page
- Which hook for processing plugin page form data?
- Calling a shortcode in the backend
- Add tabbed menu to admin page
- WYSIWYG – Getting the “link” button from HTML mode in Visual mode
- Error thrown. Cannot create references to/from string offsets
- How can I restore admin capabilities?
- Admin page redirect to another admin page
- What determines whether admin toolbar is shown to a logged-in user?
- Ajax Check Post Status
- How to disable https from wordpress site?
- Apply permissions per post
- Where should I hook into admin?
- How to remove wp panel for users
- Unable to upload image using the standard uploader in the WP admin (v4.3)
- Fixed layout for admin section
- Copying WordPress site, HOW about the DB connection?
- Add menu item to edit specific page
- Does an administrator access allow someone to access to the WordPress database?
- Change Name of Category Heading in New Post
- Load stylesheet on custom admin submenu page
- Disable login on multisite web sites
- Plugin permissions for Editor role
- How to remove the default checked attribute from inputs in admin?
- Error 404 Display on otherlinks apart from homepage
- Admin Access for specific page(s)
- Link fields in User Admin list
- Sortable admin columns by 0.00 number
- WordPress Admin Thickbox: Remove Margins/Padding
- How to change the title attribute for the WP logo image on wp-login.php
- WordPress Admin Email
- WordPress “Hide WP” Gives Me Error After Admin Login [closed]
- Editing post in admin panel
- Making a custom upload form and page in the admin section
- site admin for subscribers
- Customise the add media pop-up to include rel attribute option
- WordPress admin loads erratically “connection reset by peer”
- How to fix broken admin Thickbox?
- Pull Random Images From Options Page [closed]
- 2FA for admin login only, is it doable?