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
- How to enable custom fields for pages (if not a bad practice)?
- Custom Field Create Bulk via SQL Query
- More efficient to add content to custom fields or the content area?
- Custom field query without duplicates results
- how to display an excerpt of the latest post on the homepage?
- How should I setup the “Users” area to hand over to a client?
- How to change permalink on headlines in rss feeds?
- Plugin privelages for “editors”
- Displaying custom field meta within WP_query loop
- Metabox/Custom fields are not saving input data
- Get Sticky User in user loop based on user role
- Saved Post Meta Array Returns as String
- Thirtieth century date for a post
- Custom field in external Javascript
- list pages by custom_field?
- Make Custom Fields Public in JSON – API