-
Florian Bansac's profile was updated 5 years, 11 months ago
-
Florian Bansac's profile was updated 5 years, 11 months ago
-
Florian Bansac replied to the topic How display the notifications on header (colors) in the forum Creating & Extending 6 years, 9 months ago
Hi,
The term “Notifications” is included in the output of the $notif variable, as you can see here:
// condition: 0 unread notifications
[Read more]
if($bpnotifcount == 0) {
$notif = '<li><a href=" ' .$url. ' ">Notifications <span class="notifmenucount">'. bp_notifications_get_unread_notification_count(… -
Florian Bansac replied to the topic Change Colors on Buddypress Notifications ! in the forum Creating & Extending 7 years, 10 months ago
If there are still people looking for help, I have been trying different things today to:
-add the notifications counter in menu
-style differently if 0 notifications or 1+
-target only the mainIt works for me, maybe you can check from here:
// filter to target only main menu
[Read more]
add_filter('wp_nav_menu_items','my_nav_menu_notif_counter', 10,… -
Florian Bansac replied to the topic How display the notifications on header (colors) in the forum Creating & Extending 7 years, 10 months ago
I tried all sorts of things on this topic today, I ended up with something that looks like it’s working. Maybe you can try it:
// filter to target only main menu
add_filter('wp_nav_menu_items','my_nav_menu_notif_counter', 10, 2);function my_nav_menu_notif_counter($menu, $args) {
$url = bp_core_get_user_domain(bp_loggedin_user_id())…[Read more]
-
Florian Bansac's profile was updated 7 years, 10 months ago
@floarchi
Active 4 years, 5 months ago