I’m not actually a fan of themes with tons of design options. I think as a designer, it’s our job to design theme.
However, it’s not always a bad idea to let user express their creativity.
Last weekend, I create another theme. Nevertheless, a simple one with classic design. And this time I create several color options for it. Usually I prefer “refresh” transport method for my themes, because it’s works, easier to code (and maintain in the future). But because this is a simple theme, I get it done relatively quickly. So I decide to “play” and use “postMessage” transport method for the color options.
There are problems I found when implementing this, and I want to share my solution.
Here’s the theme, you can download and check the source code:
Well, there was a time when I need to remove admin color scheme option. And this how I do that.
I was building a complex site with several user role, and to make it easier to know which user role I use to login, I set each user role to use different admin color scheme and disable admin color option in profile edit.
That was actually a question by a fellow WordPress designer/developer when he realized his code didn’t work (I’ll explain the problem below).
It’s actually a simple mistake and can be avoided if we use “refresh” transport method when creating customizer option. But I do understand that “postMessage” transport method is better (but needed more code).