Open bobbingwide opened 3 years ago
With just style.css
and nothing else in the child theme visiting the site produced
Warning: filemtime(): stat failed for C:\apache\htdocs\wp-a2z/wp-content/themes/wizzie/category.css
in C:\apache\htdocs\wordpress\wp-content\themes\fizzie\functions.php on line 105
Template part has been deleted or is unavailable: header
Template part has been deleted or is unavailable: page-content
Template part has been deleted or is unavailable: search
Template part has been deleted or is unavailable: page-footer
Template part has been deleted or is unavailable: footer
Template part has been deleted or is unavailable: footer-menu
The first message is because the Fizzie tries to locate category.css
from the directory returned from get_stylesheet_directory()
.
Now that Fizzie is being used a parent theme ( the template theme for wizzie) then we need to change the (Fizzie) code to use get_template_directory()
and get_template_directory_uri()
.
The subsequent messages are most likely due to Fizzie's templates and template parts hardcoding the theme
attribute to the wp:template-part
blocks.
To resolve the problem loading category.css
I needed to change Fizzie
To resolve the Template part has been deleted messages I added functions.php
copied from Fizzie, significantly reduced to:
The template-part block override implements support for loading the template parts from the child theme ( get_stylesheet_directory()
) then the parent theme ( get_parent_directory()
), if no custom version is found in the database.
I also eliminated the call to _gutenberg_inject_theme_attribute_in_content()
.
I need to check if this was actually necessary.
I may need to implement some of the PRs raised against WooCommerce in order to be able to load HTML templates and template parts when
add_theme_support( 'woocommerce' )
is defined.
For blocks.wp-a2z.org I've developed a Full Site Editing theme called Fizzie, which replaces the Genesis-a2z child theme used on other subdomains of wp-a2z.org.
Now I want to attempt two things, both of which are WooCommerce based:
Wizzie is intended to satisfy the first requirement, and Forefront* the second.
Requirements
Proposed solution
Additional / override templates / template parts needed in wizzie
Notes
See https://developer.woocommerce.com/2021/06/08/woocommerce-5-4-released/ for slightly confusing notes about WooCommerce blocks.
I may need to implement some of the PRs raised against WooCommerce in order to be able to load HTML templates and template parts when
add_theme_support( 'woocommerce' )
is defined.https://github.com/woocommerce/woocommerce/pull/30013/files