Ok Great, thanks.
I decided just to use simple html to add a notification in the header above the sidebar to show Message & Announcement counts only when there are any unread, and a scrolling banner across the top of the site when there is an unread announcement. In case anyone else wanted something like this, here’s the code I used…
In header.php:
<!-- Position this code to show the scrolling banner in the desired location of the header -->
<?php
unset ($new_msg);
unset ($new_ann);
$new_msg = fep_get_new_message_number();
$new_ann = fep_get_new_announcement_number();
?>
<?php if ($new_ann != 0):
if ($new_ann == 1){
$s="There is an important new site announcement";
} else {
$s="There are " . $new_ann . " important new site announcements";
}
$s = $s . " - please click here to read now...";
?>
<a itemprop="url" href="<?php echo esc_url( home_url() . "/private-messages/?fepaction=announcements"); ?>" class="announce">
<marquee behavior="scroll" direction="left"><b><?php echo $s; ?></b></marquee>
</a>
<?php endif; ?>
<!-- Position code to show # of unread messages/announcements in the desired location -->
<div style="text-align:right">
<?php if ($new_msg + $new_ann != 0): ?>
<a itemprop="url" href="<?php echo esc_url( home_url() . "/private-messages/?fepaction=messagebox"); ?>" class="notice">
<b>Unread Messages: </a><?php echo $new_msg; ?></b>
<?php if ($new_ann != 0): ?>
<a itemprop="url" href="<?php echo esc_url( home_url() . "/private-messages/?fepaction=announcements"); ?>"class="notice">
<b>TEST_Site Announcements: </a><?php echo $new_ann; ?></b>
<?php endif; ?>
<?php endif; ?>
</div>
Added classes to Style.css:
a.notice {
color: red;
}
a.notice:hover {
color: #ff6666;
text-decoration: none;
}
a.announce {
color: blue;
}
a.announce:hover {
color: #8383af;
}