How to assign a theme to a group?

I’m working on a customised theme that adds functionality. Currently I’m the only user / tester of it, but I’d like to make it available for certain members, without listing it for everyone.

Is there any way to easily assign a theme to a group?

There is no way to do this, it sounds like an interesting request especially when extended to other parts like “default watched categories” for a group and other user defaults.

You would need a plugin for it now.

4 Likes

Thanks for confirming Sam.

I’ve been developing a theme with modifications suitable for staff, but now realise I can’t make that theme available for staff, mods, a group or even for myself (except for hitting preview theme each time), unless everyone gets access to it. Seems like a useful feature. And would make theme testing easier before releasing themes to all.

I haven’t dived into Plug-ins.

You can kind-of do it. We add a class to the body tag for primary groups, for example .primary-group-team. So you could wrap your entire theme CSS in

body.primary-group-team {
    // All theme styles here
}

There’s also a .staff class on body, of course this could make your CSS a bit large if you’re trying to cram a bunch of groups in one customization.

7 Likes

Thanks Kris.

I also realised tonight, that I can create a bookmark in my browser straight to the theme “Preview” using the URL:

https://xxx.xxx.xxx/admin/themes/yy/preview

Where yy is the theme number. I got the URL by right clicking on the preview button and copying the link. This allows me to open the forum using my unreleased (in development) theme.

It’s also a faster way to get other staff to check it out, rather than telling them to click: ADMIN>Customize>theme>correct theme>preview.

2 Likes