Look at F:\sites\wp-git\wp-admin\js\common.js:
$('div.updated, div.error').not('.below-h2, .inline').insertAfter( $('div.wrap h2:first') );
If your notice has the class updated or error, it will be set after the first h2 automatically. When you create custom messages, make sure you are using one of these classes. Then you can just append them to body, and WordPress will move them to the proper place.
Related Posts:
- Unable to render Admin Notices
- What are the standard admin CSS id/class tags?
- Modal window from within WordPress admin
- How to pass parameters to admin_notices?
- How to Change the Default Home Page for the WordPress Dashboard?
- How To Remove WordPress Version From The Admin Footer
- Set Default Admin Colour For All Users
- Securing Admin Accounts – Username Discovery
- Can an admin check passwords of registered users?
- How-to make the admin area mobile friendly [closed]
- How to obtain the user ID of the current profile being edited in WP-Admin?
- 3.3: How do you hide the new dashboard welcome panel?
- Appearance->Editor not visible
- Possible to create placeholder images in WordPress editor that are clickable (should bring up uploader)?
- Admin pages have no content
- Blocking Administrative Access to Authors and Subcribers?
- How to find out if an wp-admin action edited a file?
- How to display only logged in user’s post comments in comments area
- WordPress 3.8 get current admin color scheme
- How to Use Resposive Tables in WordPress ADMIN Pages?
- How to add a link to the tax term in the admin Edit page?
- How can I access profile Admin Colour Scheme
- Admin Notices coding standard issue
- I keep getting logged out in Firefox
- Add tabbed menu to admin page
- remove_action with profile_personal_options
- Getting the different post statuses + count like in edit.php, in a custom submenu page
- How to notify the admin about something that happened during a cron job
- how to redirect to url.com/wp-admin if url.com/admin is typed in?
- How To Create User Specific Admin User Pages?
- Change the Default Pages Menu View in wp-admin
- Conditionally load CSS/JS/PHP in wp-admin if using a mobile device
- How to disable automatic excerpt generation *in admin*?
- Limit Words in Category / Term Description – Admin Panel
- Change top level menu item to point to custom submenu item
- Associating custom submenu item with post type of top level menu item
- Is there a way to hook into the update-core page for custom messages?
- Adding text in more than one language (at the same time)
- wp-admin post.php JavaScript Links Not Working
- Super slow admin panel
- Admin Taxonomy Terms – Orderby Term Field
- Fatal error: Exception thrown without a stack frame in Unknown on line 0
- Hide Pages on Edit Pages based on Capability (edit_others_pages)?
- How to display a WordPress notice on create_term action
- Display popup or admin-notice after add new categories
- Unable to Access WP Admin or Login buttons after Migration
- Add ‘Last Modified’ and Attachments (Yes/No) to WordPress Users Column
- Editors change a permalink on an unpublished post, but only admins change a permalink on a post that has ever been published?
- How Can I Found Admin Directory
- WordPress post feature image not uploading
- Combine and Minify wp-admin files, also re-write URI’s for CDN
- 500 internal server error on wp-admin only
- Redirect from the dashboard to edit.php if wp_is_mobile() is true
- Seems that admin_post_{action} does not executing
- Add Custom Script in Other Plugin’s Options page
- When submitting the form site.com/blog/wp-admin it goes to site.com/wp-admin
- Can I host WP-admin locally for a remote blog?
- get_current_screen and the WP_Screen class
- Getting admin notices to appear after page refresh
- Is there alternative to WP_List_Table?
- WordPress Brute Force Prevention
- Admin login not working
- Adding and removing columns from the admin pages panel
- Hide admin notice when user profile updated
- How to make sure your admin doesn’t hi-jack you site?
- How to change the descriptive text on the menus admin page?
- Dynamic WordPress Admin Panel
- Wp-Admin FTPS Connection Error unlike Filezilla
- Is it possible to push admin notices to one specific user instead of all users?
- Find out if post was just updated on post edit screen
- How to update my website with WordPress?
- wordpress login loop after install
- WordPress login not working
- Admin blank but Admin menu showing
- Capability to read/edit page in wp-admin only for administrators
- Problems in migration of WordPress site from local server to the online server
- WYSIWYG editor not in a post editor?
- htaccess and htpasswd
- plugin to upload to youtube via wordpress [closed]
- You do not have permission to access this document on form submit
- Display notice in block editor after wp_insert_post_data hook
- Organizing Code in your WordPress Theme's functions.php File?
- How to remove admin menu pages inserted by plugins?
- Admin Ajax is returning 0
- Add custom column to Users admin panel
- Changing the Order of Admin Menu Sections?
- wp_verify_nonce vs check_admin_referer
- Add a Separator to the Admin Menu?
- How to determine whether we are in add New page/post/CPT or in edit page/post/CPT in wordpress admin?
- how to know if admin is in edit page or post [duplicate]
- Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?
- Where in WP can I check history or log of updates of plugins etc?
- Admin Page Redirect
- Disable dragging of meta boxes?
- Adding a custom admin page
- How does admin-ajax.php work?
- Loading External Scripts in Admin but ONLY for a Specific Post Type?
- How to remove entire admin menu?
- How do I remove dashboard access from specific user roles?
- How can I speed up my WP admin section?