How to output a CSS class in the notifications loop
-
Hi all,
I’ve copied-and-pasted the notifications loop into a custom drop down / flyout box like Facebook, done the same for friend requests and messages and almost everything is working wonderfully. The messages loop outputs a read/unread css class to show a user which messages are unread, how do I do something similar with the notifications?
I have copied-and-pasted bp_has_notifications() into my functions.php file, removed the IF statements at the top that filter for either read or unread so the loop now outputs both read and unread messages in the same go when called in my custom flyout boxes, but I’m trying to figure a way of outputting a css class for the read or unread notifications.
I’ve tried IF = $is_new; within the notifications while loop to echo a css class with no success.
any of you kind clever people have any ideas how I can do this?
Thanks in advance!
as per guidelines – here is my spec – WordPress 4.3.1, Directory install (root), BP 2.3.5, quite a few plugins installed, bbpress (2.5.8), Buddyboss wall, BP profile search. Buddyboss media, Activity comment notifier, paid memberships pro, cloudflare and a few others. Running Avada theme. Core files have not been touched (I know I would get told off if I did 😛 ) Nothing in bp-custom. Hosted by namecheap.
edited : clarify some ambiguity
- The topic ‘How to output a CSS class in the notifications loop’ is closed to new replies.