Adding “Notifications” to wp_nav_menu_items
-
I’m trying to put the notifications in a new sub nav, but I can’t get it to work. This is what I have:
`add_filter(‘wp_nav_menu_items’,'custom_nav_items’,10,2);
function custom_nav_items($menu, $args) {
global $bp;
$args = (array)$args;
if ( is_user_logged_in() ) {
if ( $args != ‘primary’ )
return $menu;
$customNav = ‘‘;
if( function_exists(‘my_bp_adminbar_notifications_menu’) ) my_bp_adminbar_notifications_menu();
return $menu.$customNav;
} else {
$loggedoutNav = ‘‘;
return $menu.$loggedoutNav;
}
}`I’m also trying to stick “Messages (#)” up there, too, but haven’t tried yet.
Anyone know why it’s not working?
You must be logged in to reply to this topic.