Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 23,840
- How-to & Troubleshooting
- 129,881
- Creating & Extending
- 25,910
- Requests & Feedback
- 9,553
- Third Party Plugins
- 9,834
- Showcase
- 3,316
- Ideas
- 1,402
- Miscellaneous
- 9,184
-
As you know bp_total_unread_messages_count() will echo the count.
Many BP functions have a version that just returns a variable.
In your case, here they are:
if (bp_get_total_unread_messages_count( bp_loggedin_user_id() ) > 0 )
//etc
if (bp_friend_get_total_requests_count( bp_loggedin_user_id() ) > 0 )
//etc