enqueue styles properly

This commit is contained in:
Aadil Ayub 2024-04-25 19:36:57 +05:00
parent 0b90197bff
commit 7ac9ec03d5

View File

@ -2,9 +2,13 @@
function cmt_styles() {
wp_register_style( 'custom-styles', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'custom-styles' );
}
add_action('wp_enqueue_scripts', 'cmt_styles');
function cmt_block_styles() {
add_theme_support( 'editor-styles' );
add_editor_style( 'style.css' );
add_theme_support( 'wp-block-styles' );
add_editor_style( 'styles.css' );
}
add_action( 'after_setup_theme', 'cmt_block_styles' );
wp_enqueue_style( 'custom-styles' );