As experienced WordPress developers, we've relied on admin notices countless times to communicate critical updates, errors, or tips directly in the dashboard. These built-in alerts from WordPress core, themes, and plugins help users stay informed without disrupting their workflow.

Admin notices deliver errors, warnings, successes, and key info right where admins work. Whether you're a site owner guiding clients, a plugin author signaling updates, or managing a multi-author site, they provide targeted guidance.

Pro tip: Use them sparingly to avoid overwhelming users. Now, let's dive into adding your own with authority-backed methods we've tested across hundreds of sites.
This hands-on approach offers ultimate flexibility. New to code? See our guide on how to add code snippets to WordPress.
Add this to your theme's functions.php or a custom plugin:
function general_admin_notice() {
global $pagenow;
if ( $pagenow == 'options-general.php' ) {
echo '<div class="notice notice-warning is-dismissible"><p>This notice appears on the settings page.</p></div>';
}
}
add_action( 'admin_notices', 'general_admin_notice' );Here's how it looks:

The $pagenow global detects the page. Wrap content in a <div class="notice [type] [is-dismissible]">: use notice-error, notice-warning, notice-success, or notice-info. The is-dismissible class adds a close button.
Customize further with conditions, like showing only to authors on the dashboard:
function author_admin_notice() {
global $pagenow;
if ( $pagenow == 'index.php' ) {
$user = wp_get_current_user();
if ( in_array( 'author', (array) $user->roles ) ) {
echo '<div class="notice notice-info is-dismissible"><p>Click on Posts to start writing.</p></div>';
}
}
}
add_action( 'admin_notices', 'author_admin_notice' );Result:

Experiment with roles, capabilities, or plugins for endless variations.
For simplicity without sacrificing control, install the KJM Admin Notices plugin. Follow our step-by-step plugin installation guide if needed.
Head to Settings » KJM Admin Notices:

Enable notices, add a custom post type for management, toggle email alerts or comments, then save.
A new Notices menu appears. Create one via Notices » Add Notice—it's like editing a post.

Set title, content, category, roles, and display options (hide title/author/date, add dismiss button):

Publish to go live:

Easily edit, delete, or email users. Email issues? Check our WordPress email troubleshooting guide.
Alternative: WP Notification Center for a Facebook-style bell icon.

That's it! Master admin notices to enhance your site's UX. Next: build a custom user registration form.
Subscribe to our YouTube channel for more. Follow on Twitter and Facebook.