Created
September 14, 2020 09:20
-
-
Save blogjunkie/1efb4c12f8d45c7d7e9537adea672cff to your computer and use it in GitHub Desktop.
Quickly add CSS for block editor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Don't include this opening tag | |
/** | |
* Add inline styles to admin head | |
*/ | |
add_action( 'admin_head', 'child_block_editor_styles' ); | |
function child_block_editor_styles() { | |
if ( 'post' == get_post_type() ) : | |
?> | |
<style> | |
.block-editor-writing-flow .wp-block { | |
max-width: 800px; | |
} | |
</style> | |
<?php | |
endif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment