From 7292538af3f84ba5882201fc1e35aa063665a664 Mon Sep 17 00:00:00 2001 From: Shail Mehta Date: Fri, 9 Oct 2026 12:14:57 +0530 Subject: [PATCH 1/2] Use get_parent_theme_file_uri() for theme stylesheets --- functions.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 1e77bd0..063be75 100644 --- a/functions.php +++ b/functions.php @@ -17,7 +17,12 @@ * @return void */ function ipsum_editor_style() { - add_editor_style( array( 'style.css', 'assets/css/editor-style.css' ) ); + add_editor_style( + array( + get_parent_theme_file_uri( 'style.css' ), + get_parent_theme_file_uri( 'assets/css/editor-style.css' ), + ) + ); } endif; add_action( 'after_setup_theme', 'ipsum_editor_style' ); @@ -33,7 +38,7 @@ function ipsum_styles() { // Register theme stylesheet. wp_register_style( 'ipsum-style', - get_stylesheet_directory_uri() . '/style.css', + get_parent_theme_file_uri( 'style.css' ), array(), wp_get_theme()->get( 'Version' ) ); From 08b6002a89d850e6290e5869c9e5e64303240907 Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Tue, 20 Oct 2026 10:23:15 +0200 Subject: [PATCH 2/2] Keep relative paths for the editor styles add_editor_style() fetches full URLs over HTTP when the block editor loads. That request fails on hosts that block loopbacks, including wp-env, which drops the editor styles. Relative paths are read from disk, as in the default themes. Co-Authored-By: Claude Opus 5.5 --- functions.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/functions.php b/functions.php index 7171ae1..6de414c 100644 --- a/functions.php +++ b/functions.php @@ -17,12 +17,7 @@ * @return void */ function ipsum_editor_style() { - add_editor_style( - array( - get_parent_theme_file_uri( 'style.css' ), - get_parent_theme_file_uri( 'assets/css/editor-style.css' ), - ) - ); + add_editor_style( array( 'style.css', 'assets/css/editor-style.css' ) ); } endif; add_action( 'after_setup_theme', 'ipsum_editor_style' );