diff --git a/wp-content/themes/hello-elementor/assets/css/custom.css b/wp-content/themes/hello-elementor/assets/css/custom.css new file mode 100644 index 0000000..a1e3ce8 --- /dev/null +++ b/wp-content/themes/hello-elementor/assets/css/custom.css @@ -0,0 +1 @@ +p:last-child{margin-bottom:0}/*# sourceMappingURL=custom.css.map */ \ No newline at end of file diff --git a/wp-content/themes/hello-elementor/assets/css/custom.css.map b/wp-content/themes/hello-elementor/assets/css/custom.css.map new file mode 100644 index 0000000..b1678a0 --- /dev/null +++ b/wp-content/themes/hello-elementor/assets/css/custom.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["custom.scss"],"names":[],"mappings":"AACC,aACC,eAAA","file":"custom.css"} \ No newline at end of file diff --git a/wp-content/themes/hello-elementor/assets/css/custom.scss b/wp-content/themes/hello-elementor/assets/css/custom.scss new file mode 100644 index 0000000..77a14a3 --- /dev/null +++ b/wp-content/themes/hello-elementor/assets/css/custom.scss @@ -0,0 +1,5 @@ +p { + &:last-child { + margin-bottom: 0; + } +} diff --git a/wp-content/themes/hello-elementor/functions.php b/wp-content/themes/hello-elementor/functions.php index 269ddf2..c9ce820 100644 --- a/wp-content/themes/hello-elementor/functions.php +++ b/wp-content/themes/hello-elementor/functions.php @@ -271,3 +271,36 @@ if ( ! function_exists( 'hello_elementor_body_open' ) ) { require HELLO_THEME_PATH . '/theme.php'; HelloTheme\Theme::instance(); + +add_action( 'wp_enqueue_scripts', function() { + + $file_path = get_stylesheet_directory() . '/assets/css/custom.css'; + $file_url = get_stylesheet_directory_uri() . '/assets/css/custom.css'; + + if ( file_exists( $file_path ) ) { + wp_enqueue_style( + 'hello-custom-css', + $file_url, + array(), + filemtime( $file_path ) + ); + } + +}, PHP_INT_MAX ); + +add_action( 'wp_enqueue_scripts', function() { + + $file_path = get_stylesheet_directory() . '/assets/js/custom.js'; + $file_url = get_stylesheet_directory_uri() . '/assets/js/custom.js'; + + if ( file_exists( $file_path ) ) { + wp_enqueue_script( + 'hello-custom-js', + $file_url, + array('jquery'), + filemtime( $file_path ), + true + ); + } + +}, PHP_INT_MAX ); \ No newline at end of file