From 14d518206e01d248c53ec026c23411ca225a7cb5 Mon Sep 17 00:00:00 2001 From: Aadil Ayub Date: Tue, 29 Aug 2023 15:41:54 +0500 Subject: [PATCH] whoops, forgot to eneque php --- functions.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index b934fd4..23c13b9 100644 --- a/functions.php +++ b/functions.php @@ -21,4 +21,11 @@ function autonomic_block_styles() { add_theme_support( 'editor-styles' ); add_theme_support( 'wp-block-styles' ); add_editor_style( 'block-styles.css' ); -} \ No newline at end of file +} +add_action( 'after_setup_theme', 'autonomic_block_styles' ); + +function autonomic_theme_scripts() { + // this is also for block styles + wp_enqueue_script( 'autonomic-block-styles', get_theme_file_uri( '/js/block-styles.js' ), array( 'wp-blocks', 'wp-dom' ), wp_get_theme()->get( 'Version' ), true ); +} +add_action( 'wp_enqueue_scripts', 'autonomic_theme_scripts' ); \ No newline at end of file