From a69e87f064007e9416849db2de8217eb400ea41a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 1 Mar 2022 11:12:08 +0100 Subject: [PATCH] Dirty Fix abnormal behavior when logged in (Ticket 105 again..) --- content/themes/ldc/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/themes/ldc/functions.php b/content/themes/ldc/functions.php index 8d37c201..70099cc9 100644 --- a/content/themes/ldc/functions.php +++ b/content/themes/ldc/functions.php @@ -90,7 +90,10 @@ function load_js_css() { wp_enqueue_script('jquery');*/ //wp_enqueue_script( 'twentytwenty-js', get_template_directory_uri() . '/js/index.js', array(), $theme_version, false ); - // wp_enqueue_script( 'jquery-js', get_template_directory_uri() . '/js/jquery-1.11.1.min.js', array(), null, false ); + // ! Only if user is logged in push normal jquery + if (is_user_logged_in()) { + wp_enqueue_script('jquery-js', get_template_directory_uri() . '/js/jquery-1.11.1.min.js', array(), null, false); + } wp_register_script('jqueryUseWPML', '', [], '', false); wp_enqueue_script('jqueryUseWPML'); wp_add_inline_script('jqueryUseWPML', '$ = jQuery');