diff --git a/includes/block-overrides.php b/includes/block-overrides.php index 91c922c..8058b9d 100644 --- a/includes/block-overrides.php +++ b/includes/block-overrides.php @@ -20,7 +20,7 @@ //require_once __DIR__ . '/query-loop.php'; //require_once __DIR__ . '/post-excerpt.php'; require_once __DIR__ . '/post-content.php'; -//require_once __DIR__ . '/template-part.php'; +require_once __DIR__ . '/template-part.php'; //require_once __DIR__ . '/navigation.php'; require_once __DIR__ . '/navigation-link.php'; //require_once __DIR__ . '/post-hierarchical-terms.php'; @@ -44,7 +44,7 @@ function fizzie_register_block_type_args( $args ) { //$args = fizzie_maybe_override_block( $args,'core/query-loop', 'render_block_core_query_loop' ); //$args = fizzie_maybe_override_block( $args,'core/post-excerpt', 'render_block_core_post_excerpt' ); $args = fizzie_maybe_override_block( $args,'core/post-content', 'render_block_core_post_content' ); - //$args = fizzie_maybe_override_block( $args,'core/template-part', 'render_block_core_template_part' ); + $args = fizzie_maybe_override_block( $args,'core/template-part', 'render_block_core_template_part' ); //$args = fizzie_maybe_override_block( $args,'core/navigation', 'render_block_core_navigation' ); $args = fizzie_maybe_override_block( $args,'core/navigation-link', 'render_block_core_navigation_link' ); //$args = fizzie_maybe_override_block( $args,'core/post-hierarchical-terms', 'render_block_core_post_hierarchical_terms' ); diff --git a/includes/template-part.php b/includes/template-part.php index cc60e32..befa8af 100644 --- a/includes/template-part.php +++ b/includes/template-part.php @@ -98,9 +98,9 @@ function fizzie_load_template_part( $attributes ) { $locale = get_locale(); if ( 'en_US' !== $locale) { - $template_part_file_path = get_stylesheet_directory() . "/languages/$locale/block-template-parts/" . $slug . '.html'; + $template_part_file_path = get_stylesheet_directory() . "/languages/$locale/parts/" . $slug . '.html'; } else { - $template_part_file_path = get_stylesheet_directory() . '/block-template-parts/' . $slug . '.html'; + $template_part_file_path = get_stylesheet_directory() . '/parts/' . $slug . '.html'; } $content = fizzie_load_template_part_file_by_slug( $slug, $template_part_file_path );