From e191289f8de1f3a19c22961d7232ccc854193e6c Mon Sep 17 00:00:00 2001 From: Valentin Date: Sat, 7 Dec 2024 20:40:25 +0100 Subject: [PATCH] Fixed: autoload error if file doesn't exist --- functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 96c4878..9d4f94d 100644 --- a/functions.php +++ b/functions.php @@ -118,7 +118,9 @@ function studio_scripts() // == Load autoload.php for dependencies -require_once get_template_directory() . '/vendor/autoload.php'; +if (file_exists(get_template_directory() . '/vendor/autoload.php')) { + require_once get_template_directory() . '/vendor/autoload.php'; +} // == Allow Gutenberg editor on posts but not on pages, only if ACF page template is selected