Create Child Theme and Move Site Editor Changes
-
I have exactly the same situation as what is described in this thread: https://www.ads-software.com/support/topic/child-theme-how-to-move-site-editor-changes-from-parent-to-child/
I started making changes using the site editor and only then concluded that it was better to do this in a child theme. I initially hoped it would be as easy as moving the theme.json file from the parent to the child theme but that didn’t work.
I then followed the advice in the above thread and installed the Create Block theme plugin but unfortunately, it throws an exception whenever I try to create a child theme. See below.Fatal error: Uncaught Error: Call to undefined method WP_Error::addThemeDir() in C:\xampp\htdocs\WordpressTestSite\wp-content\plugins\create-block-theme\admin\create-theme\theme-zip.php:103 Stack trace: #0 C:\xampp\htdocs\WordpressTestSite\wp-content\plugins\create-block-theme\admin\class-create-theme.php(266): Theme_Zip::add_templates_to_zip(Object(WP_Error), 'user', 'twentytwentythr...') #1 C:\xampp\htdocs\WordpressTestSite\wp-content\plugins\create-block-theme\admin\class-create-theme.php(470): Create_Block_Theme_Admin->create_child_theme(Array, Array) #2 C:\xampp\htdocs\WordpressTestSite\wp-includes\class-wp-hook.php(324): Create_Block_Theme_Admin->blockbase_save_theme('') #3 C:\xampp\htdocs\WordpressTestSite\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #4 C:\xampp\htdocs\WordpressTestSite\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #5 C:\xampp\htdocs\WordpressTestSite\wp-admin\admin.php(175): do_action('admin_init') #6 C:\xampp\htdocs\WordpressTestSite\wp-admin\themes.php(10): require_once('C:\\xampp\\htdocs...') #7 {main} thrown in C:\xampp\htdocs\WordpressTestSite\wp-content\plugins\create-block-theme\admin\create-theme\theme-zip.php on line 103
I found this thread which suggested uncommenting extension=zip in php.ini but that did not solve this problem. (https://www.ads-software.com/support/topic/fatal-error-when-trying-to-make-a-child-theme/)
Any help would be appreciated. Thanks.
- The topic ‘Create Child Theme and Move Site Editor Changes’ is closed to new replies.