I have been trying to figure out how hivepress goes about adding the red circle with a number inside, suggesting to the user that they have unread messages and what not, but haven’t found out how it is done. <small class="hp-menu__item small>"
I am trying to display this notification in a custom place, and I probably could do it with some sloppy javascript looking for the element mentioned above, but I figured maybe I could try to understand how it is implemented in hivepress, and use this way to my success.
With this code, you can get the number of notifications hivepress()->request->get_context(‘notice_count’).
You can view the styles through the Developer console, for example, create a test user and send a message to the admin, log in through the admin, and view these styles in the console.