[![How to Add Your Own Admin Notices in WordPress 1](https://coma.lv/wp-content/uploads/2025/12/Gemini_Generated_Image_qidj6vqidj6vqidj.jpg)](https://coma.lv/wp-content/uploads/2025/12/Gemini_Generated_Image_qidj6vqidj6vqidj.jpg)

# How to Add Your Own Admin Notices in WordPress

Oct 30, 2025/by [Vadim Pavlovich](https://coma.lv/en/author/djcoma/)

Admin notices are used by themes, plugins and the WordPress core to display warnings, tips and other important information on the user’s screen. In this article we will look at how you can add your own notices in WordPress and manage them for your own needs.

## Why and When Should You Use Notices?

![WordPress](https://coma.lv/wp-content/uploads/2025/11/Ekranuznemums-2025-11-14-020536.jpg)

If you work on a site for clients who are not very familiar with WordPress, you can add admin notices to display useful information throughout the admin area. This is especially useful if you are building a site for a team of authors: notices help newcomers get up to speed faster. However, we advise approaching this with caution, as they can be very annoying. Now let’s see how you can enable them.

## Method 1. Add Your Own Notices Manually

This method requires you to add code to your WordPress site. You need to paste the following snippet into your theme’s functions.php file or into a custom plugin:

function general_admin_notice() { global $pagenow; if ( $pagenow === &#039;options-general.php&#039; ) { echo &#039; &lt;div class=&quot;notice notice-warning is-dismissible&quot;&gt; &lt;p&gt;This notice appears on the settings page.&lt;/p&gt; &lt;/div&gt; &#039;; } } add_action(&#039;admin_notices&#039;, &#039;general_admin_notice&#039;);

This code displays a notice on the settings page. This is how your notices will look in the admin area:

![WordPress](https://coma.lv/wp-content/uploads/2025/11/Ekranuznemums-2025-11-14-021414.jpg)

If you study the code, you will notice that we have the $pagenow variable, which detects the current page. After that we added a condition that checks whether the page is suitable for showing the notice. If it is, we show the notice wrapped in a <div> element with WordPress admin interface classes. The available classes are: notice-error, notice-warning, notice-success, notice-info. And the is-dismissible class adds a button for closing the notice.

Besides checking the page, you can add all kinds of conditions for showing notices. For example, show a notice only to users with the **Author** role:

function author_admin_notice() { global $pagenow; if ( $pagenow === &#039;index.php&#039; ) { $user = wp_get_current_user(); if ( in_array( &#039;author&#039;, (array) $user-&gt;roles, true ) ) { echo &#039; &lt;div class=&quot;notice notice-info is-dismissible&quot;&gt; &lt;p&gt;Click on &lt;a href=&quot;edit.php&quot;&gt;Posts&lt;/a&gt; to start writing.&lt;/p&gt; &lt;/div&gt; &#039;; } } } add_action(&#039;admin_notices&#039;, &#039;author_admin_notice&#039;);

In this case an additional check of the user’s role has been added. Such a notice will appear only for authors.

Feel free to experiment with different filters and conditions.

## Method 2. Add Notices with a Plugin

This method is simpler because it does not require you to use code. The [WP Custom Admin Interface](https://wordpress.org/plugins/wp-custom-admin-interface/) plugin handles this task well. However, the free version of this plugin has limitations: you can create only one notice. If you want to create several notices, consider **Custom Admin Interface Pro**, which removes these limitations and unlocks the full functionality.

After installing and activating the plugin, a new menu **Custom Admin Interface → Admin Notices** will appear in the admin area, where you can create and configure notices for any users and sections. You will see something like a post editor.

![WordPress](https://coma.lv/wp-content/uploads/2025/11/Ekranuznemums-2025-11-14-024934.jpg)

In the **Notice Content** field you enter the text of the notice. Here you can use special tags such as [CURRENT_YEAR], [WEBSITE_TITLE], [WEBSITE_TAGLINE], [WEBSITE_URL], [ADMIN_EMAIL_ADDRESS], as well as user-related tags: [USER_FIRST_NAME], [USER_LAST_NAME], [USER_NICKNAME] and [USER_EMAIL]. You can add media, visual elements or code.

Next you can choose the notice color via **Admin Notice Color** and set the expiry date via **Admin Notice End Date** in the YYYY-MM-DD format. If you wish, you can make the notice **dismissable** so that users can close it. There is also an option for exceptions: the notice is shown to all users except those you add in the **Add an exception case** section. After making all the settings, click **Save All Settings** to activate the notice.

Besides letting you add your own notices, WP Custom Admin Interface offers a wide range of features, such as personalizing the menu, adding your own widgets, simplifying the interface for authors or clients and managing access to admin sections.

---

*Our specialization is WordPress website development and maintenance. Contact us for a free consultation — [vadim@coma.lv](mailto:vadim@coma.lv), [+371 29394520](tel:+37129394520)*

---
