add this code to your function.php
<?php
function showMessage($message, $errormsg = false)
{
if ($errormsg) {
echo '<div id="message" class="error">';
}
else {
echo '<div id="message" class="updated fade">';
}
echo "<p><strong>$message</strong></p></div>";
}
function showAdminMessages()
{
showMessage("This is my message.", true);
}
add_action('admin_notices', 'showAdminMessages');
?>
Related Posts:
- Is it safe to store a user setting you don’t want the user to ever modify as a user option?
- User Profile / Add Custom Fields
- Saving custom profile fields
- Register rest field for specific user
- WordPress User Profile Upload – If page is saved file reset
- Display Custom Field for a Specific Role, but not for Admin
- How to parse a huge list of users using a CRON function?
- How to save multiple custom user profile fields using repeater JQuery
- file upload user profile
- Get a list of all available fields in the User Profile
- Extra profile field as select box?
- How to get users by a custom field / by user meta data?
- How do you add a custom option to user data?
- Custom user avatar in the WordPress users listing
- Modify custom Users Manage page
- Show User Their Password
- How to reload the role specific registration form on validation errors?
- Adding Properties to User Profile and Displaying in List
- How can I sort get_users() by any value (last_name, user defined fields and more)
- Extra filed under “About the user” user profile
- Add description text under input field for new profile fields
- get_user_meta Short Profile Section
- BuddyPress – Hook to Update Custom Profile Fields [closed]
- Calling custom profile fields?
- Redirect users based on custom field
- Custom User Profile Fields
- How to add local users to wordpress without email password?
- Add More Fields to Users Pages (Admin Panel)
- Creating user relationships
- Buddypress Add unserialized Profile Fields in Members Loop [closed]
- How to add field above password section in profile page
- Add conditional custom option to ‘Display name publicly as’ dropdown
- WP_User_Query pulling ACF to loop
- Custom Fields – Taller editing area
- Front-end editing with custom fields?
- Calling the “wp-link-wrap” pop-up modal
- Excluding Specific Fields from Profile Builder Registration Form
- Custom Profile Fields move from BBpress to BuddyPress
- Manipulate javascript code from custom made admin page menu
- Passing args to WP_User_Query am I using meta correctly?
- UPDATE on SELECT results. A SQL query to swap Author with Meta Box value
- Customizing user data
- Add additional ‘description’ field for defined roles / role metadata?
- Declaring in variables [closed]
- Custom Field to a Role?
- Linking Custom Fields to Database Records
- Show user info in a hovercard [closed]
- Customizing WP user profile with custom fields
- Can’t save custom field on registration page
- Iterate through users and display users meta info at front-page
- Show image if author meta (profile fields) exists outside loop
- How to disable Edit Post and Allow only Custom Field?
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- check for duplicate user meta data before updating
- how to make a custom field readonly or disabled by user role?
- How to hide user profile fields based on the role of the viewed user?
- Custom Field Repeating When Using foreach
- Front end register with custom fields
- Front-End User Profile
- Get emails from users by custom field SQL
- How to Make Post Custom Column Editable
- How can I create a profile field group that the user can’t see?
- HM CMB: Role Select
- How can I add/update post meta in a admin menu page?
- Save custom field types with this function…?
- Display the output from Custom User Fields from a WordPress user profile on a WordPress Custom Page
- Adding data to User profile
- Delete user meta but only if found in array
- how to create user profile pages and display them based on users roles
- hide page menu from admin panel for specific users
- open modal window
- Hide custom fields by user’s role
- Link fields in User Admin list
- want to add video upload option for front end user
- Restrict Access to the User Profile
- update_user_meta(): invisible data storage
- Extend WP_User_Query or WP_User to return all custom fields?
- Register author, facebook connect, publish posts from front end
- Calling a custom profile field only it it exists
- Echo text if field under user_meta is empty with get_users()
- Semi-Private Comments + page comments -> is it possible?
- how to add radio field on user meta on function.php?
- Add custom fields to specific menus
- Custom Admin Menu Report for Specific User ID
- Custom post type needs to capability to create and edit by some specific user role
- Use a custom page with dynamic content as a user profile page
- How to improve my non-unique metadata MySQL entries?
- Easily adding multiple existing users to a multisite site
- How to display extra fields for user
- Use value from ACF to populate other fields
- Dynamically populate query source in Elementor post widget
- How to make WordPress ‘editor’ role to list/view/add/edit users only with the role ‘author’?
- Custom date column in user table not sorting correcting
- Set class if a meta value is set within post archive
- Add link to wordpress field data
- Adding text box with add_meta_box
- pass custom value from single.php to another file via get
- How to only display all posts to a custom User Role?
- I need a link that directs the user that is logged to his profile
- How to hide “Change role to” dropdown on Users admin menu