I have some actions like this
function simple_notification() {
echo '<div>This is a notification</div>';
}
add_action( 'site_notices', 'simple_notification' );
function simple_notification2() {
echo '<div>This is a notification</div>';
}
add_action( 'site_notices', 'simple_notification2' );
function simple_notification3() {
echo '<div>This is a notification</div>';
}
add_action( 'site_notices', 'simple_notification3' );
Now i'm displaying those action by calling do_action in my template
<?php do_action('site_notices'); ?>
I would like to display notice count near a menu link called notifications Can anyone tell me how to calculate it?
Update:
As you can see, three notices displayed when i use do_action('site_notices');
So I want to display in the menu like notifications (3)
