Alternate Logo On Different Theme

AI-generated summary

The discussion revolves around using an alternate logo on different themes in Discourse. CaptainZac initially inquired about the possibility of having different logos for various themes, such as a retro logo for a retro theme.

Tris20 suggested utilizing the existing dark mode logo feature, which can be used for a secondary theme. However, for more than two themes, a theme component would be necessary.

awesomerobot mentioned a deprecated theme component that might still work for adding logo URLs to specific themes. This component could potentially be maintained for the purpose of having different logos for different themes.

pfaffman shared an example of a community that changes the logo based on the user’s primary group, which sparked interest from CaptainZac and ncaming215 inquiring about how to achieve this. However, pfaffman clarified that the logo change is actually based on the category being visited, using CSS overrides.

Hey all!

Just curious if anyone knows of a way that you are able to use an alternative logo on different themes. For example, if the forum were to make a retro theme, we would add a retro logo. Having a modern logo is kind of out of place so being able to have a different type of logo on the different theme would be nice, but I’m not sure if there’s a way to actually do this. Please let me know!

It would be nice to have this fuctionality expanded with a theme component, but currently you can have two logos. One for normal theme, and one for dark mode.

So in Settings-> Branding you have your standard logo

But you also have the dark mode logo

Your dark mode doesn’t have to be dark. So you can essentially make a main theme, and a retro theme. If you wanted more than that you would probably need a theme component.

We deprecated the theme component because it was mostly used for dark mode logos (which are now in Discourse settings by default)… but I’d expect this to still work: GitHub - discourse/discourse-alt-logo · GitHub

This allows you to add some logo URLs to the theme component settings, and then you’d add this theme component to the theme you want to have different logos. Maybe we should still maintain this component with the different logos for different themes use case in mind :thinking:

I have one community that is for many universities and sets the logo to their institution according to their primary group.

Do you know how I would be able to do that?

Is this available as a theme component (or a plug-in?). I’m guessing a theme component would mess with the dom, and I’ve never gotten that method to play well with Discourse.

The logo is changed by category that you’re visiting, not the user’s group. And CSS overrides the content of the logo depending on what category is being visited.