Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Getting the unread-count inbox-count info elsewhere


Simon Dabkowski
Participant

@simoncreative

Here’s what I use:

<?php

global $bp;

$hmag_inbox_count = messages_get_unread_count();

if ($hmag_inbox_count > ‘9’) {

$hmag_inbox_count = ‘9+’;

}

echo ‘<span class=”your-style”>’.$hmag_inbox_count.'</span>’;

?>

Displays a number for # of unread. If the count is greater then 9, it displays 9+

Skip to toolbar