Add Styles for Gutenberg Editor
Adding custom styles to Gutenberg blocks is easy and at the same time very useful. All you need to do is to add a snippet in your functions.php or plugin file. Selecting a style to a block simply adds a class that you can style wherever you want!

Share
Add Styles to Gutenberg editor WordPress.
/**
* Register and enqueue a custom stylesheet in the WordPress admin.
*/
add_action('admin_enqueue_scripts', function () {
$editor_style_uri = get_stylesheet_directory_uri() . '/build/editor.css';
$editor_style_path = get_stylesheet_directory() . '/build/editor.css';
wp_register_style('custom_wp_admin_css', $editor_style_uri, false, filemtime($editor_style_path));
wp_enqueue_style('custom_wp_admin_css');
});
More tutorials
Form Builders Haven’t Evolved — WP AI Forms Might Be the Exception
An honest review of WP AI Forms from a Gutenberg-first perspective. How conversational AI changes the way forms and actions are built…
Read more Form Builders Haven’t Evolved — WP AI Forms Might Be the Exception
How to Add Your Company’s LinkedIn Feed to Your WordPress Website
Learn how to add your company’s LinkedIn feed to WordPress — with step-by-step instructions for manual embeds and the ProFeedWP plugin.
Read more How to Add Your Company’s LinkedIn Feed to Your WordPress Website
How to Add ACF Filters to WordPress Feeds: A Step-by-Step Guide
Learn how to enhance your Query Loop Block by using custom Advanced Custom Fields (ACF) with the Filter Query Block Pro plugin.
Read more How to Add ACF Filters to WordPress Feeds: A Step-by-Step Guide


