Talk during the WPBlockTalk online event on April 2nd, 2020. Presented by Ellen Bauer, Front-end developer at Elmastudio.
WPBlockTalk, April 2nd 2020HOW TO PREPAREA THEMEFOR GUTENBERGCase Study:
View Slide
twitter @ellenbauerwp @elmastudioweb elmastudio.de/enELLEN BAUERFront-end developer@Elmastudio
1How to getstarted?
Theme Support Block Editor Handbook⟶1
Download Theme Unit Test xml file2
Tutorials on Themeshaper blog3
Look at other themes, e.g. Twenty Twenty, Go4
2Pimp your theme
Add your editor stylesadd_theme_support( 'editor-styles' );add_editor_style( 'style-editor.css' );
Add wide and full-width alignment to blocksadd_theme_support( 'align-wide' );
/* Main column width */.wp-block {max-width: 680px;}/* Width of "wide" blocks */.wp-block[data-align="wide"] {max-width: 1200px;}/* Width of "full-wide" blocks */.wp-block[data-align="full"] {max-width: none;}in your style-editor.css:
// Add custom editor font sizes.add_theme_support('editor-font-sizes',array(array('name' => __( 'Small', 'aino' ),'shortName' => __( 'S', 'aino' ),'size' => 14,'slug' => 's',),array('name' => __( 'Large', 'aino' ),'shortName' => __( 'L', 'aino' ),'size' => 26,'slug' => 'l',),));Add custom font sizes:
3WHICH BLOCKSTO SUPPORT?
all core blocksWooCommerce blocksJetpack blocksform plugin blocksblock collection blocksbuild your own blocks
Create block style variations
IT’S A LOT!block patternsGlobal StylesBlock-based themesFull Site editingReactCSS gridCSS variablesJavaScript
How to stayup-to-date?4
Install Gutenberg plugin and test regularly1Read Make WordPress Gutenberg updates2Listen to Gutenberg Changelog podcast3Join WordPress Slack channel4Follow the Gutenberg plugin development on GitHub5
find your nicheHow do your customerswant to use WordPress?Let’s be excitedto create
Helpful skills:React, JavaScriptCSS GridCSS variablesThank you and #staysafe