Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multicolor not working with Preset #2489

Open
idlevibes95 opened this issue Aug 4, 2022 · 1 comment
Open

Multicolor not working with Preset #2489

idlevibes95 opened this issue Aug 4, 2022 · 1 comment

Comments

@idlevibes95
Copy link

idlevibes95 commented Aug 4, 2022

Issue description:

I've tried every way I can think of, but Preset just doesn't work with Multicolor (works fine with the Color control). There's no example in the Kirki docs either. Is it possible at all for Multicolor to work with Preset?

Version used:

4.0.21

Using theme_mods or options?

theme_mods

PHP error messages that might be related

JS error messages that might be related

Code to reproduce the issue (config + field(s))

@codejp3
Copy link

codejp3 commented Oct 3, 2022

I'm fairly new to Kirki and figuring things out myself, but from looking at the JS file that applies presets, I'm going to say NO, it's not an option as-is right now.

/kirki/packages/kirki-framework/module-preset/src/script.js

Presets are applied to a specific controlValue, controlID combo.

Multicolors have multiple choices within a single controlValue, controlID combo, and you want the presets to apply to those multiple choices, not the controlValue, controlID combo.

I think a few JS code edits to that specific file could accomplish what you want, or you could accomplish it by following the example exactly as it is in the docs by setting up individual color fields (instead of a multicolor field) and applying the presets to those individual color fields:
https://kirki.org/docs/arguments/preset/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants