From the course: WordPress Content Blocks: Working with Themes
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Disable custom color option - WordPress Tutorial
From the course: WordPress Content Blocks: Working with Themes
Disable custom color option
- [Instructor] On the topic of custom colors, for some themes you may want to disable this custom color option so users can only apply colors from the custom color palette you've declared. You can disable this custom color option with a single line of code. It looks like this and I'll add it directly before enable custom color palette. Add theme support. Disable custom colors. Now this name, disable custom colors, is a bit misleading because it sounds like you're disabling custom colors altogether. What you're actually doing is just disabling the custom colors that WordPress itself provides. When we add it together with the color palette, you'll see that we keep the color palette, we just take away that option for the custom color that you can select from the entire color wheel. So this restricts the user to only using the defined colors for this particular theme.
Contents
-
-
-
-
(Locked)
Add support for wide alignments2m 32s
-
(Locked)
Add styles for wide alignments5m 48s
-
(Locked)
Add support for theme-specific colors3m 16s
-
(Locked)
Add styles for theme-specific colors3m 43s
-
(Locked)
Disable custom color option55s
-
(Locked)
Add support for font sizes2m 25s
-
(Locked)
Add styles for font sizes2m 46s
-
(Locked)
Disable custom font sizes1m 7s
-
(Locked)
Add support for responsive embeds3m 16s
-
(Locked)
-
-