Notifications for HivePress [Custom Plugin]

Hey @everyone,

I’ve been quietly working on this one for a while, and I’m excited to announce it’s finally ready to share with the community: Notifications for HivePress! :tada:

On-site notifications have been on the community wish list for a long time. @simonavshalom opened a topic about push notifications back in 2022 that’s still picking up replies today, @Renterworld asked for unread counts in the browser tab that update without reloading the page, and last December I asked @JSHBV about the notification system they’d built for their own site. They very kindly explained what it had taken: a preferences layer so people don’t get spammed, a quicker way to fetch and mark notifications, and a sticky header to keep it all in view. That reply stuck with me, and it ended up shaping most of what this plugin does.

I know an official take on this is on the roadmap, so think of this one as something to be getting on with in the meantime.

The good news is that HivePress already does the hard part. Every notification your site sends flows through one shared system, whichever extension it comes from, and @ihor has pointed out before that this is the place to tap in if you want to mirror notifications somewhere else. That’s exactly what this plugin does. It picks up that same stream, shows it on the site itself, and lets each person choose whether they’d rather have a given notification as an email, as an on-site notification, or as both.

Because it works from that shared layer rather than from each extension separately, Messages, Bookings, Marketplace, Requests and Memberships are all covered from the moment you activate it, and any extension you add later is picked up automatically.

Examples:

What your users get

  • A Notifications page in their account with the full history, grouped by date, with a search box and a filter by type
  • Mark as read or unread, clear everything that’s already been read, or delete one at a time
  • Delete with an undo window, so a mistaken tap on a phone is recoverable
  • Pop-ups that slide in as things happen, with a countdown that pauses when hovered
  • Unread counts beside Notifications in the account menu and in the browser tab title, so nothing gets missed
  • Each notification shows the sender’s profile picture or the listing photo, with a matching icon

What your users control

  • Their own settings page, with notifications grouped by area rather than dozens of separate rows
  • Per group they choose on-site, email, push, or nothing at all, so someone can keep their booking emails and switch off everything else
  • Quiet hours, including a window that runs past midnight. Notifications still arrive in the list, they just don’t interrupt

The header bell

An optional bell in the site header with its own unread count and a dropdown of the most recent notifications.

  • Pick the icon from the same searchable Font Awesome set HivePress uses
  • Set its colour and hover colour, and the size
  • Add a background circle if you want one, with its own hover colour
  • Nudge it a few pixels in either direction to line it up with whatever your theme puts beside it, without shifting anything else in the header
  • It counts notifications specifically, separately from the count ListingHive already shows, and there are switches to hide the theme’s own counters if you’d rather not have two numbers up there

There’s also an optional sticky header, which keeps page anchors clear of itself, so a link that jumps to a review or a section still lands where you meant it to rather than underneath the header.

Four notification types of its own

As well as mirroring what HivePress already sends, the plugin adds four notifications for moments that don’t have an email behind them:

  • Listing Favourited, when someone favourites a listing
  • Review Received, when a review is left, or when a moderated one is approved
  • Booking Completed, which links straight through to leaving a review on the listing
  • Badge Earned, showing the badge that was actually awarded

What you control

Everything lives under HivePress > Settings > Notifications, in six sections ordered from what you’ll change most often down to what you’ll rarely touch:

  • Delivery - how often an open tab checks for anything new, web push, the header bell and all its styling, the switches for hiding your theme’s own counters, the sticky header, and anonymous statistics
  • Pop-ups - on or off, separate desktop and mobile positions, how many show at once, whether they hide themselves and after how long, plus an optional sound with five styles
  • Appearance - background, text and accent colours, corner radius, text size and weight, unread count colour, and dropdown width
  • Types - choose which notifications users can manage, group by group. Anything left unticked is sent by HivePress as usual, and users can’t turn it off
  • Defaults - the channels each WordPress role starts with, and a storage period that clears old notifications automatically
  • Text - write the wording for each notification using tokens like %listing.title% and %sender.display_name%, with a fallback after a pipe in case something’s missing. Leave one blank and it uses the email subject as it is

There are also two pages of their own: Announcements and Statistics.

Announcements

  • Send an on-site notification to everyone, one role, all your vendors, or named users
  • Large sends go out in scheduled batches, so nothing times out
  • Greet people by name using a token
  • There’s a history of what was sent, by whom, and how many it reached
  • Resending recalculates the audience at the time you send, so a role that has grown since reaches its new members too

Web push

Push notifications reach people who have your site closed entirely.

  • Keys are generated for you the first time, so there’s nothing to set up
  • Nothing sensitive travels in the push itself. The browser is simply woken up and fetches the notification from your site
  • People are asked for permission only after a few visits, never on their first, because a refused prompt can never be asked again. You choose how many visits
  • There’s also a button on their own settings page so they can switch it on whenever they like

Privacy, translations and housekeeping

  • Notifications are included in the WordPress personal data export and erasure tools, so data requests are handled properly
  • The statistics are anonymous totals only, and can be switched off
  • A POT file ships with the plugin, so everything can be translated or reworded with Loco Translate
  • WP-CLI is supported: wp hivepress notifications types, recount and cleanup
  • New releases appear on your Plugins screen like any other update, with a details popup and one-click install
  • Free and open source (GPLv3)

Requirements and installing

WordPress 6.0+, PHP 7.4+, and HivePress. Web push additionally needs HTTPS, which nearly every site already has.

Download the latest release here, then go to Plugins > Add New > Upload Plugin, choose the zip, and activate.

Updating later? Upload the new zip and choose “Replace current with uploaded”. Don’t delete the plugin first, because deleting runs the uninstall routine, which by design removes every notification, option and preference.

Then head to HivePress > Settings > Notifications. The defaults are sensible, so the only things you really need to decide are whether you want the header bell and the pop-ups. Every other option has a description explaining what it does, so you can work through the rest whenever you fancy it.

A few things worth knowing

  • Turning the on-site channel off for a group stops those notifications being created at all, rather than just hiding the pop-up
  • iOS Safari only allows web push for sites that have been added to the home screen. That’s an Apple rule rather than a plugin one
  • Notifications are kept well away from your WordPress comments screens, so your comment counts and moderation queue are untouched

As always, the internals are checked against the current versions of HivePress and each extension, so it behaves like a native part of your site rather than something bolted on.

This is a first public release, so if you run into any issues, find bugs, or think of an awesome new feature, please drop a reply below. I’d much rather hear about a problem than not! :slight_smile:

P.S. If this extension saved you time or money, consider buying me a coffee! Sharing these tools for free takes a lot of time and resources, and your support helps me keep doing it for the community. Thank you! :hot_beverage:

Cheers,
Chris :v:

4 Likes

Hi @ChrisB,

Thanks a lot for sharing! This looks great, and it seems to fit really well with the HivePress design. :honeybee:

This is definitely a useful addition for HivePress websites.

If you don’t mind me asking, what AI tool do you use for coding? My guess would be Claude, but maybe you use something else?

Thanks again for contributing and sharing your work with the community!

Hi @Kseniia,

​Thanks so much! :blush:

​I’m really happy with how this one turned out!

​Good guess; it was indeed Claude! It’s been brilliant for helping work through the code and implement my never-ending list of tweaks and new ideas. :see_no_evil_monkey:

​I’m still updating older extensions and adding updates via WP Dashboard to give the plugins a more polished, professional feel. Plus, I have a few more half-baked extensions on the way soon! :smiling_face:

​Thanks again for the kind words!

​Cheers,
Chris :victory_hand:

1 Like

Thanks for sharing, the notifications feed UI looks great!

1 Like

Hey @ChrisB

Big fan of your plugins! Thanks a ton :folded_hands:

Just curious, planning to list them on the WP repo? Could get better reach imo :eyes:

1 Like

Many thanks, @Prady!

I hope you can make good use out of some of them! :slight_smile:

At the moment, I’m just sharing my creations via the HivePress community forum, but I’ll consider submitting them to WordPress in time. I haven’t looked into the process yet, so I’m not really sure what’s involved to be honest. Nevertheless, I’ll probably announce it here first, if I do!

Cheers,
Chris :victory_hand:

Wishing the very best :smiling_face:

1 Like

Hey @everyone, :waving_hand:

v1.0.1 - Plugin Update Notes

The first update since the announcement post above. Everything below is at HivePress → Settings → Notifications.

Important

  • Deleting the plugin now keeps your data - Previously, deleting it removed everything in one go. It now keeps every notification, everyone’s channel choices, their quiet hours, their push subscriptions (the browsers people have allowed notifications on), your wording and all your settings. The only way to wipe any of it is to tick the new Delete All Data box, in a new “Removing the Plugin” section at the bottom of the settings tab. Deactivating never removed anything, and still doesn’t.

  • If you are still on 1.0.0 - update in place from your Plugins screen rather than deleting the plugin and installing a fresh copy. It is 1.0.0’s uninstaller that does the wiping, so deleting that version first would still take your notifications with it.

The new section:

Fixed

  • Unticking every box now means “none”, not “all” - Two places did the opposite of what the screen showed. Under Types, clearing every box in a group switched that whole group back on, sometimes leaving more enabled than before you started. Under Defaults, clearing every box for a user role gave that role every channel instead of none. Both now do exactly what you set. If you had cleared a group or a role because you wanted everything, please tick the ones you want instead.

  • Tokens no longer screw up when you save - Any token whose name started with two characters that happen to be hexadecimal (0 to 9 and a to f, in either case) was destroyed on save: %badge.name% came back as dge.name%, and %decline_reason% as cline_reason%. WordPress’s own text cleaner was treating them as percent-encoded characters and stripping them. The tokens the box recommends now survive being typed in.

  • The sticky header no longer gets stuck - Switching the header bell off after using the sticky header left the header pinned to every page, with the tick box that would undo it no longer on screen.

  • Translations - translated wording no longer keeps HTML codes in it.

  • Site name - a site name containing an ampersand is no longer written into notifications with the code showing, so a site called Bob & Sons no longer appears as Bob & Sons.

  • Fewer details sent out - the update check and web push no longer include your site address and WordPress version in their request headers.

Changed

  • Clearer settings, rewritten throughout - Several descriptions described behaviour the plugin did not have. The Types section claimed that unticking a notification left it “working exactly as HivePress sends it”, which was not true of the four types that have no HivePress email behind them (Listing Favourited, Booking Completed, Review Received and Badge Earned). Unticking one of those turns the feature off, and it now says so. The Text section said an empty box falls back to the email subject line, when in fact about forty of the boxes have their own wording built in, shown in grey inside the box. Every setting now has a tooltip, including the notification groups and the per-role boxes, which had none at all.

The Types section:

  • Storage period moved and renamed - It is now “Delete Notifications Older Than (days)”, in its own section called “Deleting Old Notifications”, rather than sitting under a heading that promised nothing could be lost. Your existing setting is unchanged.

The renamed setting:

Existing installs are offered v1.0.1 on the Plugins screen. v1.0.0 has been removed, so a fresh download gets 1.0.1 too:

Update via your dashboard as usual! :slight_smile:

Examples:

Cheers,
Chris :victory_hand: