For admin area you can use admin_notices:
https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices
For public area (front end) you would probably need to output to some hook and insert the proper CSS. You could use wp_footer() for that, which is present in every theme (or at least should be) and is inside the body tag.
Related Posts:
- Does WordPress have a built in message function for presenting notifications to users?
- Remove Update Notification (for all users except ADMIN)
- Show Admin Message on Redirect
- How to send notifications without a plugin when a post is updated in WordPress?
- 3 different mail notifications
- Email has been changed notifications
- What are the pros and cons to a WordPress run newsletter v. third party newsletter? [closed]
- REST alert when new WordPress post is published or updated
- Can I show a custom message to a specific user?
- send new post notification to an email address stored in a custom field value
- Removing sensitive information from comment notifications – notify_post_author
- How can I format email notification after registration?
- Conditional wp_mail statement on post
- Notification when certain posts are published
- How to display Real-Time notifications (via Icons) in WordPress
- WordPress, Mailchimp, Campaigns – should separate campaigns be used for something like notifying users of drip content?
- Notification on getting an email from an user
- How to prevent comment moderation flood?
- Looking for plugins that notify users of comment replies [closed]
- How to hide popping up Google Play’s unlocked achievement programatically?
- Disable email notification after change of password
- Alert Email when any Post or Page is Changed
- Enable update notification, disable updates
- Add update notification bubble to admin menu item?
- How to disable the “Your site has updated to WordPress x.y.z” admin email?
- Customizing the Subject Field in WordPress’ Notification Emails?
- Disable new user notification to admin email
- Showing WP_Error message with admin_notice action hook
- How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?
- Disabling pingback and trackback notifications
- Notify admin when page is edited?
- How can I edit the email sent when a new comment is received?
- Admin to user notices – best practices?
- How to notify users of blog updates a la Admin Plugin Update notifications?
- If new comment posted in custom post – send notification to custom email from custom field
- Disable Admin account being emailed for comment notification
- WordPress comments email notification for authors
- admin_notices not working in post editor
- Disable WP notifications for commenting on own posts
- PGP-Encrypt system-generated notifications
- Best way to notify WordPress plugin users of new release candidates for beta testing?
- admin_notices not displaying in plugin
- Why is WordPress asking me to update my new (virtually blank) theme?
- Notification to Admin or Author upon new post [duplicate]
- Getting admin notices working for plugin errors
- Tag subscription option in wordpress. How?
- Where are the admin notifications stored?
- Mechanism to send to users of secured WordPress install new notifications by SMS or email?
- Is it possible to change an existing post status from ‘pending’ to ‘publish’ via email?
- WordPress independent plugin upgrade notification system [duplicate]
- Notice bar at frontpage for multisite
- Notify admin on new submit
- Howto disable comment moderation emails for admins, but not for authors
- Facebook-like Notification Plugin for WordPress Community Blog Sites?
- Notify post author for a new comment on his post?
- Reply By Email to comment notifications
- How to notify specific users when i’m posting/modifying a new post
- PAGE Specific Email Notifications
- New Post Notifications for Users – BUDDYPRESS
- comment_notification_text filter for custom post type
- Send a conditional email notification when a custom field value changes in Post Type
- Save value from Javascript object to WP user
- Disable New User Registration Email sent to WordPress admin email on 4.9.5
- How do I troubleshoot registration/password email errors?
- Send email notifications to a defined email address depending if a product in order has a specific TAG [closed]
- How do I disable the discussion notification emails to us when a comment is “approved” and when an adiministrator replies?
- Adding Notification Bubble on Admin Top Bar
- New register email notification sending some fields blank on site admin emai id
- Post Status Frontend Announcement
- how to display a string in admin_notices hook from a class plugin
- How to send a BuddyPress user a notification on a plugin event? [closed]
- How to split out BuddyPress notifications drop down items to their own top level? [closed]
- How to customize maintenance mode notification in wordpress?
- comment_notification_text filter not working
- How to send automatic response after form submission without plugin
- Need to suspend RSS feed while repairing missing old post
- Email post to submitter
- After form submission want to show success message in the form page
- How to check if a new private custom post type is created?
- Check if “Send the new user an email about their account” is ticked
- Mobile Notification on a blog post
- Notify admin (by email) if post added with specific tag
- Exclude Current user email and send notification
- Not receiving any e-mails after new comment
- Displaying errors on the front end from my plugin
- How to disable the “Your site has updated to WordPress x.y.z” admin email?
- BCC email to subscribers
- Possible to hide the search engine indexing disabled prompt/error message?
- Which hook to use to add notification message at beginning of my
- Custom notification for contributors when posts are scheduled
- User profile update author
- Subscribe to a post’s comments without posting a comment yourself
- Trying to disable all notifications except for one on woocommerce checkout page with css [closed]
- Notifications Bar on home page only
- Look for one plugin which could send notification to any email when post publish
- How to send push notification in android using php? [closed]
- Call API on post save/update and show the result in admin area
- Admin notice on wp_insert_post
- Only Admin receives email
- Why is my custom email notification after purchase not sending?