Title: Show notice inside a post hook function
Last modified: October 18, 2016

---

# Show notice inside a post hook function

 *  [Michele Pinassi](https://wordpress.org/support/users/o-zone/)
 * (@o-zone)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/show-notice-inside-a-post-hook-function/)
 * Hi all,
 * working on a plugin, i need to show notice box to the user as a confirm (or not)
   of an action fired by a POST function.
 * Just to clarify, i need to know hot to fire up a notice box inside post hook 
   function like:
 * add_action( ‘admin_post_register’, ‘allaround_action_register’ );
 * function allaround_action_register() {
    […] here i need to show a notice box […]}
 * Thanks.

Viewing 1 replies (of 1 total)

 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/show-notice-inside-a-post-hook-function/#post-8331435)
 * I have this:
 *     ```
       add_action( 'admin_notices', 'my_errors' );
       function my_errors() {
         global $my_error;
         echo '<div class="notice notice-error"><p>'.$my_error.'</p></div>'.PHP_EOL;
       } // end function
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Show notice inside a post hook function’ is closed to new replies.

## Tags

 * [hook](https://wordpress.org/support/topic-tag/hook/)
 * [notice](https://wordpress.org/support/topic-tag/notice/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/show-notice-inside-a-post-hook-function/#post-8331435)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
