Function to check if group has notifications
-
WordPress 4.0, BuddyPress 2.1.1
Hey,
I’d like to display an icon in my groups sidebar if there are new notifications related to that group.
For messages I’m using the function:
bp_total_unread_messages_count()
Is there a similar function for group notifications?
This is my code to handle displaying the groups:
<?php if ( bp_has_groups( bp_ajax_querystring( 'groups' ) . 'max=4&type=random' ) ) : ?> <?php while ( bp_groups() ) : bp_the_group(); ?> <li class="item-title"> <div class="grid-33"> <?php bp_group_avatar('type=thumb&width=40&height=40'); ?> </div> <div class="grid-66"> <a>"><?php bp_group_name(); ?></a><br /> <span><?php group_member_count() ?><span> <i class="fa fa-group"></i> </div> </li> <?php endwhile; ?> <?php endif; ?>
Thanks in advance!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Function to check if group has notifications’ is closed to new replies.