i'm writing some custom wordpress pages, and i want that after an action where the user has addess an item to a list (after the user press the submit button and the page reloads showing the updated list) a messagge appears on top of the content area saying something like "the item xxxxxxx has been added." and then fades away after a couple of seconds (or it could stay with an "x" to the right to close it).

There is any function in Wordpress that allows meto do that? The fading is optional, but i want to give the customer some kind of feedback (maybe in a green-border on white box or something like that).

Also optional but interesting would be to have also the error message, all the same just red border instead of green.

The message has to show inside the page, not over and has not to be modal nor an js alert.

  • Search for "admin notice" (there's a hook also).
    – kaiser
    Commented Oct 16, 2011 at 19:32

1 Answer 1


WordPress makes use of add_settings_error() and related function to setup notifications to display.

Using them is not very straightforward, so easier way might be to make use of hooks like admin_notices or all_admin_notices to output your own message and style it in same way as WP does.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.