Title: Unread Message Count Notification Shortcode
Last modified: November 3, 2022

---

# Unread Message Count Notification Shortcode

 *  Resolved [vcugreg](https://wordpress.org/support/users/vcugreg/)
 * (@vcugreg)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/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!

Viewing 1 replies (of 1 total)

 *  Plugin Author [ProfileGrid Support](https://wordpress.org/support/users/profilegrid0/)
 * (@profilegrid0)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/unread-message-count-notification-shortcode/#post-16173272)
 * Hello [@vcugreg](https://wordpress.org/support/users/vcugreg/),
 * We have noted the issue of zero count display for unread message, and we will
   fix this in our future release.
 * Regarding the display to logged in users, you may use plugin’s content privacy
   feature which allows you to hide the content of a post and page to logged in 
   users. For more details on this, please visit the link: [https://profilegrid.co/wordpress-content-restriction/](https://profilegrid.co/wordpress-content-restriction/)
 * ProfileGrid extension “Widget Privacy” allows to visibility of a content to logged
   in users only. For details on this, please visit the link: [https://profilegrid.co/extensions/profilegrid-widgets-privacy/](https://profilegrid.co/extensions/profilegrid-widgets-privacy/)
 * If you are using Elementor builder on your site, then you may also check one 
   other extension “Elementor Content Restriction”, which allows you to restrict
   content with Elementor page builder. For more details, please visit the link:
   [https://profilegrid.co/extensions/profilegrid-elementor-content-restrictions/](https://profilegrid.co/extensions/profilegrid-elementor-content-restrictions/)
 * Please check all the available options. If you still face any issue, please get
   in touch with us directly using [this form](https://metagauss.com/help-and-support/).

Viewing 1 replies (of 1 total)

The topic ‘Unread Message Count Notification Shortcode’ is closed to new replies.

 * ![](https://ps.w.org/profilegrid-user-profiles-groups-and-communities/assets/
   icon.svg?rev=2547387)
 * [ProfileGrid – User Profiles, Groups and Communities](https://wordpress.org/plugins/profilegrid-user-profiles-groups-and-communities/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/profilegrid-user-profiles-groups-and-communities/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/profilegrid-user-profiles-groups-and-communities/)
 * [Active Topics](https://wordpress.org/support/plugin/profilegrid-user-profiles-groups-and-communities/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/profilegrid-user-profiles-groups-and-communities/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/profilegrid-user-profiles-groups-and-communities/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [ProfileGrid Support](https://wordpress.org/support/users/profilegrid0/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/unread-message-count-notification-shortcode/#post-16173272)
 * Status: resolved