Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallIn WordPress, “notification” can mean a message shown inside the dashboard or an email sent to someone. For a classic wp-admin page, attach a callback to the admin_notices action; WordPress 6.4.0 and later also provide wp_admin_notice() for standard notice markup. Block Editor messages use the editor’s notices API, while email notifications use wp_mail().
Choose where the notification should appear
| Destination | WordPress approach | Use it for |
|---|---|---|
| Classic wp-admin page | admin_notices |
A notice displayed on an administrative screen. |
| Classic wp-admin page, WordPress 6.4.0 or later | wp_admin_notice() |
Outputting a notice with core’s standard markup helper. |
| Block Editor | Block Editor notices API | A notice presented within the editor experience. |
wp_mail() |
A message sent to a user or administrator rather than displayed on screen. |
Before implementing one, decide what event or condition triggers it, who should see or receive it, what status it communicates, and whether a user’s dismissal should last beyond the current screen.
Add a classic admin notice with admin_notices
The admin_notices action lets a callback print a message on classic admin screens. WordPress documents the status classes notice-error, notice-warning, notice-success, and notice-info. This example scopes the output to the Plugins screen rather than showing it across the dashboard:
add_action( 'admin_notices', 'my_plugin_plugins_notice' );
function my_plugin_plugins_notice() {
$screen = get_current_screen();
if ( ! $screen || 'plugins' !== $screen->id ) {
return;
}
echo '<div class="notice notice-info"><p>Your custom notification goes here.</p></div>';
}
Change notice-info to the status class that fits the message. Keep the condition aligned with the audience: a broad, unscoped callback can display the notice on many admin screens. See the WordPress admin_notices hook reference for the hook and notice markup guidance.
#1 Best Overall
Make a notice dismissible
Add is-dismissible to the notice classes to display a close icon:
echo '<div class="notice notice-success is-dismissible"><p>Settings saved.</p></div>';
This only dismisses the notice for the current screen. It does not permanently remember the user’s choice or guarantee that the message stays hidden after navigation or a reload. If dismissal must persist, the implementation needs its own persistence logic.
Rank #2
Use wp_admin_notice() on WordPress 6.4.0 or later
WordPress introduced wp_admin_notice() in version 6.4.0. It outputs a notice using a helper that accepts arguments for the message type, dismissibility, ID, extra classes, attributes, and paragraph wrapping. For example:
wp_admin_notice(
'Your custom notification goes here.',
array(
'type' => 'info',
'dismissible' => true,
)
);
Call it from an appropriate admin hook and condition, just as you would scope a notice callback. The helper is not available on versions earlier than 6.4.0; for those versions, use the documented admin_notices markup approach. Consult the wp_admin_notice() function reference for the supported arguments and behavior.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Use the Block Editor notices API for editor messages
A message intended for the Block Editor should follow the editor’s notices API guidance rather than treating classic admin_notices HTML as interchangeable. WordPress notes that classic notices can render arbitrary HTML, while Block Editor notices use a more formal API. Follow the Block Editor Notices handbook for the editor-specific approach.
Send an email notification with wp_mail()
For a notification delivered by email, use wp_mail(); it sends email and is separate from displaying an admin notice. The wp_mail filter can modify the recipient, subject, message, headers, and attachments before sending. The WordPress wp_mail() function reference documents the function and its filter.
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




