From 927d0980bf92bb0b6e9ed1df39e54978803353f2 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Tue, 10 Jun 2025 15:54:56 +0200 Subject: [PATCH] REFACTOR using get_template_directory_uri to best handle assets and avoid boule eunqueu in child theme --- includes/init.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/init.php b/includes/init.php index 5efc794..db96a67 100644 --- a/includes/init.php +++ b/includes/init.php @@ -80,8 +80,8 @@ function carhop_enqueue_scripts() { $theme = wp_get_theme(); - wp_enqueue_style('app-css', tailpress_asset('css/app.css'), array(), $theme->get('Version')); - wp_enqueue_script_module('app-js', tailpress_asset('js/app.js'), array(), $theme->get('Version')); + wp_enqueue_style('app-css', get_template_directory_uri() . '/css/app.css', array(), $theme->get('Version')); + wp_enqueue_script_module('app-js', get_template_directory_uri() . '/js/app.js', array(), $theme->get('Version')); // wp_enqueue_style('swiper-css', 'https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css'); // wp_enqueue_script_module('swiper-js', 'https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js', array(), null, true);