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 update notification for individual plugins
- 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?
- How to change the email notification recipient (user) for new comments?
- Disable WP core updates but send email notification
- New post notification in wp_nav_menu
- Overriding the default WP Multisite notification e-mail
- Customizing the Subject Field in WordPress’ Notification Emails?
- Disable new user notification to admin email
- Send email when a new post is published [closed]
- 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?
- How to count number of functions attached to an action hook?
- How to add notification bubble for my custom admin menu page
- Disabling Comment Notifications for Post Author
- Disabling pingback and trackback notifications
- Hook/notify when any option or setting is added or updated
- Notify admin when page is edited?
- How can I edit the email sent when a new comment is received?
- Multiple Comment Moderators and Notifications
- Admin to user notices – best practices?
- How to notify users of blog updates a la Admin Plugin Update notifications?
- How can an author be subscribed to the posts of another author and receive notifications of the new posts?
- Is email post notify visitor on new media upload possible?
- Don’t send notification if author comments his own post plugin help?
- Plugin from WordPress.com for comment notification…available? [closed]
- email wordpress users using BCC
- 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
- Show admin help message across custom post type parent and child posts
- New post email alert
- admin_notices not working in post editor
- How to add notification in the sidebar of the administration panel when a Custom post type is created? [duplicate]
- Disable WP notifications for commenting on own posts
- General Setting Allow Multiple Email Notification
- How to get a nofication when post submitted
- Send Notifications to All Admins
- PGP-Encrypt system-generated notifications
- Email notification after registration in WordPress
- Display notification only once
- 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]
- Add notification bubble notice in navigation using transients
- Simple plugins to post info about new blog entries?
- Getting admin notices working for plugin errors
- Follow-up Comments Notification Without a Plug-in
- Tag subscription option in wordpress. How?
- Where are the admin notifications stored?
- “before delete post” action fire when the post is updated?
- Menu Item Location
- Displaying a message upon user registration
- Send email only upon draft
- Mechanism to send to users of secured WordPress install new notifications by SMS or email?
- Is there a hook that is called only once after plugin bulk update process is completed?
- Ajax Check Post Status
- Create simple Cookie Box for WordPress
- 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?
- Display alert on successful user Sign Up
- Email notification to an email address other than admin for custom type post comments in wordpress
- Notify post author for a new comment on his post?
- Woocommerce get billing state manually
- User registration email and let user choose pasword
- Send notifications to custom post author when custom post is edited
- Is there a way to notify specific users when new posts are published to specific pages?
- Reply By Email to comment notifications
- Can’t get buddypress notifications in front-end; why do I get this error?
- Edit Auto Update Admin Notification
- How can the recipients and content for comment email notifications on a custom post type be changed?
- Send notification to the admin when new custom post is submitted