From the course: WordPress Content Blocks: Working with Themes
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Add support for font sizes - WordPress Tutorial
From the course: WordPress Content Blocks: Working with Themes
Add support for font sizes
- [Instructor] In addition to custom background and text color, the paragraph block allows the user to change the font size of each individual paragraph block. This is done using either the dropdown under text settings that you can set to any of the predefined sizes or by using this setting here where you can set a numerical value for the size you want. As a theme developer, it's a good idea to control what sizes are available from this dropdown so you get sizes that match up with the overall design of the theme. That's done by declaring theme support for editor font sizes. And here you'll start seeing a pattern emerging. You'll remember previously in the course, we added support for custom color palette and we created an array of arrays that has each of the colors defined while the exact same thing is happening down here in add theme support editor font sizes. It's an array of arrays and inside each of the individual sizes we declare a name. So this is the human readable name that's…
Contents
-
-
-
-
Add support for wide alignments2m 32s
-
Add styles for wide alignments5m 48s
-
Add support for theme-specific colors3m 16s
-
Add styles for theme-specific colors3m 43s
-
Disable custom color option55s
-
Add support for font sizes2m 25s
-
Add styles for font sizes2m 46s
-
Disable custom font sizes1m 7s
-
Add support for responsive embeds3m 16s
-
-
-