Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aslamatwebdevstudios/24188917830fbebe87d72209c70f86c6 to your computer and use it in GitHub Desktop.
Save aslamatwebdevstudios/24188917830fbebe87d72209c70f86c6 to your computer and use it in GitHub Desktop.
Enqueue block editor styles including Front end
<?php
function my_enqueue_block_assets() {
wp_enqueue_style(
'my-block-editor-styles',
get_template_directory_uri() . '/css/my-block-styles.css',
array(),
filemtime( get_template_directory() . '/css/my-block-styles.css' ),
'all'
);
}
add_action( 'enqueue_block_assets', 'my_enqueue_block_assets' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment