Unread Message Count Notification Shortcode
-
I want to display on our front page how many unread messages a logged-in user has, but this shortcode I found in the developer docs only displays a number that is not 0.
Here’s the shortcode: [profilegrid_unread_messages]
If I place that in a text field, like this:
You have [profilegrid_unread_messages] unread messages.
It only works when there are unread messages. If there are 0 unread messages, it does not display the 0. So the message then appears as “You have _ unread messages”.Is there a way to have it say 0 when there are no unread messages?
Also, is there a way to wrap the entire message, including the shortcode, in code to only display the message to logged-in users?
Thanks in advance!
The topic ‘Unread Message Count Notification Shortcode’ is closed to new replies.