Unlock Hidden Power: 6 Little-Known Ways to Master Custom Block Styles in WordPress

Unlock Hidden Power: 6 Little-Known Ways to Master Custom Block Styles in WordPress
//add style.css to editor
function add_theme_editor_styles() {
   add_editor_style( 'style.css' );
}
add_action( 'after_setup_theme', 'add_theme_editor_styles' );
A black border style selected in the Styles panel and the black border showing on the image in the WordPress editor

Optional: removing unwanted core block styles

Now that you know how to add block styles to your theme or your plugin, you might also want to remove some additional block styles that come with the block editor out of the box.

There are two functions you’ll need to address: 

Block styles can only be unregistered in the same coding language used to register them. All core blocks are registered with JavaScript. 

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

You May Have Missed