Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Getting the unread-count inbox-count info elsewhere

@adamt19

Participant

Bumping to re-post the information that @drebabels posted but looks to have been lost due to use of quotes

bp_total_unread_messages_count() uses echo. So if you use this within an ‘echo’ you’ll get unexpected results (value doesn’t print where you expect it to in the DOM, in my experience)

add ‘get’, e.g. bp_get_total_unread_messages_count() to simply return the # of messages for the logged-in user in your code

Skip to toolbar