w3all_phpbb_unotifications doesn’t work
-
Hi, it’s me again. ??
After the 2.6.8 update, the code to show the notification count still doesn’t work.
I tried many php combinations. It didn’t work. plainly
<?php global $w3all_phpbb_unotifications; echo count($w3all_phpbb_unotifications); ?>
When it is used, it shows 0, but there is actually a notification.
You know, I usually use it in two ways. First:
function add_notification_count_to_menu($item_output, $item, $depth, $args) { if ($args->theme_location == 'primary' && $item->title == '<i class="fas fa-comment"></i> Forumlar') { global $w3all_phpbb_unotifications; if (!empty($w3all_phpbb_unotifications) && count($w3all_phpbb_unotifications) > 0){ $item_output .= '<span class="bildirimvarbaksana">'. count($w3all_phpbb_unotifications) .'</span>'; } } return $item_output; } add_filter('walker_nav_menu_start_el', 'add_notification_count_to_menu', 10, 4);
latter:
<?php global $w3all_phpbb_unotifications; if (!empty($w3all_phpbb_unotifications) && count($w3all_phpbb_unotifications) > 0){ echo'<span class="bildirimvarnokta"></span>'; } ?>
Not working. Of course, these don’t show anything because they have an if. Because as I just said, notifications show 0.
I cleared the cache. I tried from incognito tab.
What do you think is the problem?
Thanks.
- The topic ‘w3all_phpbb_unotifications doesn’t work’ is closed to new replies.