Hi, I display the number of notifications and messages to the menu navigation. Look if is what you want http://neijisite.xyz
login: moi-moi
pass: moi-moi
thanks
Im sorry, it wont let me log in.
Ok i logged in, yes something like that. My menus are in a different way though.
Here is the code
<?php if(bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) > 0 ) { ?>
<~li>
<~a><?php echo BP_NOTIFICATIONS_SLUG ?>”>
<?php echo bp_notifications_get_unread_notification_count( bp_loggedin_user_id() );
?> Notifications</~a>
</li~>
<?php } ?>
<~li>
<~a><?php echo BP_MESSAGES_SLUG ?>”><?php if(messages_get_unread_count() > 0 ) { ?>
<?php echo messages_get_unread_count();
?>
<?php } ?> Messages<~/a>
<~/li>
put in your php menu file
( delete all ~ in the code )
Where can i find that file?
What theme are you using? And how are you building your actual menu?
I am using ribosome theme. You can log in to the site using the info above to see how the menu is set up, it is a bit hard to explain.
Ok go in editor theme, click in header.php and try to ad this code just before </nav><!– #site-navigation –>
<?php if(bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) > 0 ) { ?>
<#li>
<#a href=”<?php echo bp_loggedin_user_domain() ?><?php echo BP_NOTIFICATIONS_SLUG ?>”><span style=”font-weight: bold; background: #37b5e4; padding: 2px 2px 2px 2px;”><?php echo bp_notifications_get_unread_notification_count( bp_loggedin_user_id() );
?></span> Notifications<#/a>
<#/li>
<?php } ?>
<#li>
<#a href=”<?php echo bp_loggedin_user_domain() ?><?php echo BP_MESSAGES_SLUG ?>”><?php if(messages_get_unread_count() > 0 ) { ?><span style=”font-weight: bold; background: #37b5e4; padding: 2px 2px 2px 2px;”><?php echo messages_get_unread_count();
?></span><?php } ?> Messages<#/a>
<#/li>
<#/ul>
( please delete all # symbol in this code )
It displays the numbers of notifications and messages but when i click on them, it takes me to a page that does not exist. Also is it possible to just have a number in a bubble next to the tab in the menu, not the header.
I am installing ribosome theme and do the same thing, work fine. Login for see. For you: try to desactive all plugins without buddypress if no work send me the code that you have put in header
It works but in the wrong place. I would like the header clear. I want it to just show the number next to the tab in the drop down menu. It also shows when you are logged out.
It is not possible with wordpress core. I suggest to deactivated your menu and add all page manually like you had do. You can style them properly in the future.
How will you navigate to pages if the menu is disabled?
Reproduce all your link navigation.
Add this code between <#/li> and <#li> in header.php. <#li>name of page<#/a><#/li> you can create many link you want in menu.
Add this code between <#/li> and <#li> in header.php. <#li><#a href=”page url(eg: contact)”>name of page<#/a><#/li> you can create many link you want in menu.
( delete all # in the code )