Notification Counter Positioning in Main Navigation Menu
-
Hi all,
I am trying to insert a notification counter bubble within my main navigation menu after one specific ‘menu item li id’. Using the code below I have managed to display the counter correctly on the page but am unable to work out how to place it where I want after the desired menu item. Can anyone offer any pointers?
I already have the code to display the notification counter bubble:
echo bp_notifications_get_unread_notification_count( bp_loggedin_user_id() );
I then added it to my theme’s child header.php within the main menu container div and gave it it’s own div & id to enable styling:
<div id="testid"><?php echo bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ); ?></div>
I’ve also got the CSS which makes it appear correctly:
#testid { background: #eee; border-radius: 50%; border: 1px solid #ccc; color: #000; display: inline; font-size: 70%; margin-left: 2px; padding: 3px 6px; text-align: center; vertical-align: middle; }
Thanks
- The topic ‘Notification Counter Positioning in Main Navigation Menu’ is closed to new replies.