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.
Add support for theme-specific colors - WordPress Tutorial
From the course: WordPress Content Blocks: Working with Themes
Add support for theme-specific colors
- [Instructor] Some blocks, like the paragraph block you see here inside a column's block, allow for color customization of the text color and the background color. This is all controlled from the block properties panel on the right hand side under color settings. Out of the box, the block editor provides a selection of prepackaged colors, as well as a custom color option, that lets the user select any color they want. As a theme designer or developer, there's a good chance you have opinions about what colors work and don't work for your theme, and you may want to provide the theme user with a custom color palette or selection of specific colors to use instead of this random assortment you see here. The good news is your theme can be extended with custom color support, where you define your own colors and give them names. This is done by adding editor color palette theme support. Just like before, this is added in the theme setup function inside functions.php. I've added the code in…
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)
-
-