(use spacebar
or swipe to proceed)
· Michael Dance
· Live in DC
· WordPress developer at CHIEF
remove_post_type_support( 'post', 'editor' );
'supports' => array( 'title', 'editor' )
// replace default colors
add_theme_support( 'editor-color-palette', array(
array(
'name' => 'Light Gray',
'slug' => 'light-gray',
'color' => '#dedede',
),
) );
// remove color picker
add_theme_support( 'disable-custom-colors' );
add_theme_support( 'editor-font-sizes', array(
array(
'name' => 'Regular',
'slug' => 'regular',
'size' => 16,
),
) );
"Themes are responsible for creating the classes"
https://gist.github.com/mikedance/
ba2bb268570bd7cf22b258e88bb0af94
add_theme_support( 'align-wide' );
add_editor_style(); // load
add_theme_support( 'editor-styles' ); // namespace
Recommended reading:
https://wordpress.org/gutenberg/
handbook/extensibility/theme-support/
register_post_type( 'resource', array(
'label' => 'Resources',
'public' => true,
'supports' => array( 'title', 'editor' ),
'show_in_rest' => true,
'template' => array( /* next slide */ ),
'template_lock' => 'all', // or 'insert'
) );
array( 'core/heading', array(
'content' => 'Description',
) ),
array( 'core/paragraph', array(
'placeholder' => 'Enter description...',
) ),
array( 'core/separator', array(
'className' => 'is-style-wide',
) ),
array( 'core/heading', array(
'level' => 3,
'content' => 'Download',
) ),
array( 'core/file', array() ),