I tried searching but was unsuccessful.
Is there a plugin to automatically change the site logo for a period of time? I have seen some sites do this for Halloween and Christmas. We did it for pride this month, but just had to do manually.
I tried searching but was unsuccessful.
Is there a plugin to automatically change the site logo for a period of time? I have seen some sites do this for Halloween and Christmas. We did it for pride this month, but just had to do manually.
No plugin exists specifically for this, but there’s a value transformer called home-logo-image-url that could be used for this case I think. So maybe you can build a small theme component that:
api.registerValueTransformer("home-logo-image-url", ...) to return the seasonal logo URL when today’s date falls within your configured window, and the default logo otherwiseIt would make a useful addition to the theme component ecosystem! ![]()
Actually, took a quick stab at it:
If you want to test it, let me know if this works as expected and then I’ll clean it up
Oh wow. Thank you!
Is there any way to only change one of the logos? For example, the way our site works (don’t know why, just inherited it) our primary logo is text and we don’t change that. We only change the small logo.
Of course as a work around we could just change the main logo to the very same image, but that’s a bit of a hack. ETA: Thinking about this, it really would be less than ideal. If the main logo would get changed officially, then someone would have to remember to also change the duplicate in the component.
Also, the names are a little off. It looks like the first logo in site settings is called “Primary Logo” with the subtext “Appears on the site’s top navigation, as well as the top of the site’s Email Notifications.” Whereas in the plugin it says “Logo” with the subtext “Main logo, shown on desktop in light mode.” Unless I’m just misunderstanding, which is very possible.
Depends on where you look. Under admin/logo it indeed says “primary logo”, but in all site settings it doesn’t
The component settings aren’t related to the settings of the main site, meaning it’s not like they sync. I’ve updated main to primary though, as thats the most recent addition I believe.
Yeah, that’s a good idea tbh. The only downside is that I can’t force the choice of “any”, so it’s up to the admin to make sure they set at least one logo for the component to work.
Published the TC here now: