Support » Plugins and Hacks » WP-Members: Membership Framework » Different styles for "success" and "error" messages?
3 years, 11 months ago
I’m sure this should be pretty basic and straight forward as it is something natural, but I can’t seem to figure it out.
How can I make any success message (e.g. registration successful) green colored for example? And any error ones red colored?
I looked into the included CSS but there doesn’t seem to be separate rules for that, only one generic rule “wpmem_msg” for all the messages (which means they will all have the same style/color?!)
What am I missing?
Hi Hassan – you aren’t actually missing anything. There is one css class for messages.
However, you can change this on the fly by writing a filter function – specifically using the wpmem_msg_dialog filter, which filters the html string of the message.
Oh well, so a filter hack it is. Sorry, I thought it was just some kind of “setting” I need to change somewhere since multiple styles is a de facto case for success and error messages.
Thanks Chad for the reply, though. I’ll try to wrangle that filter and see what I’ll get.