Your cart is currently empty!
Different site colours in different groups
—
by
Hi is it possible to change some of the site colours using css when a user is logged in to a certain group say user A is in Blue group so site is blue and user B is in Pink group so site appear pink
Posted in Groups
Comments
One response to “Different site colours in different groups”
Hi Alistair,
Welcome to our support forum.
What you describe is possible but requires a custom implementation of different parts, including:
PHP to get the group(s) of the current user
CSS for specifying additional styling rules
jQuery to add the applicable CSS class to the HTML element(s)
Assuming that you have added the custom styling for the blue group, ie
body {background-color: red;
color: #000;
}
body.blue {
background-color: blue;
}
Once you get the group(s) as described here, Get all groups the current user belongs to, you can add the group as a CSS class to your body( or any other element you wish) with jQuery, ie
$('body').toggleClass("blue");This is already complicated IMO and if you’re not familiar with all the above, perhaps it would be a lot easier if you can find an existing plugin that can use different styling for each authenticated user.
Kind regards,
George