From c60be86dcca88b5880f4d3a3a29bf6c6f9a140b3 Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Sat, 26 Sep 2026 14:04:29 +0200 Subject: [PATCH] Enqueue WordPress Comment Reply Script --- functions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions.php b/functions.php index 24c7278..cb02fb2 100644 --- a/functions.php +++ b/functions.php @@ -36,6 +36,11 @@ add_action( 'after_setup_theme', 'c1024_2026_setup' ); function c1024_2026_assets() { wp_enqueue_style( 'c1024-2026-style', get_stylesheet_uri(), array(), '1.0.0' ); wp_enqueue_script( 'c1024-2026-theme', get_template_directory_uri() . '/assets/js/theme.js', array(), '1.0.0', true ); + + // Core moves and focuses the reply form and sets its parent comment ID. + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { + wp_enqueue_script( 'comment-reply' ); + } } // Load public assets through WordPress so dependencies and plugin integrations remain ordered. add_action( 'wp_enqueue_scripts', 'c1024_2026_assets' );