Count should not show when 0. Can you please give me a screenshot where showing count even after 0?
Thread Starter
Arsalan
(@sam3000us)
Here’s the screenshot
https://i.ibb.co/MRnC81V/c2.png
and here’s a video showing that the count disappears for a second after refreshing the page then it returns 0 count.
https://streamable.com/e5rzdj
And also you can see the menu moves to the left and right after refreshing.
-
This reply was modified 1 year, 4 months ago by
Arsalan.
Which code you used to show that count?
Thread Starter
Arsalan
(@sam3000us)
This is the used code in the menu:
<i class="fas fa-envelope"></i><span class="fep_unread_message_count"></span>
And this is used in the function file:
/* private message in menu */
add_filter('fep_filter_notification_call_on_ready', '__return_true');
add_action( 'wp_enqueue_scripts', function(){
wp_enqueue_script( 'fep-notification-script' );
});
Please check https://www.shamimsplugins.com/docs/front-end-pm/getting-started/show-unread-message-count-in-menu/, only first method show 0 before page load, other 2 methods works after page load. You can try to implement first method.