Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save KaineLabs/6501bfb725fa696c28dc658d02230fe5 to your computer and use it in GitHub Desktop.
Save KaineLabs/6501bfb725fa696c28dc658d02230fe5 to your computer and use it in GitHub Desktop.
Youzify - Fix Block Based Theme
<?php
// Enable Block Based Theme Template
function yzc_override_youzify_template_using_block_based_template() {
ob_start();
wp_head();
echo do_blocks('<!-- wp:template-part {"slug":"header","theme":"ncmaz-fse-theme"} /-->');
do_action( 'youzify_before_youzify_template_content' );
if ( have_posts() ) :
while ( have_posts() ) : the_post();
the_content();
endwhile;
endif;
do_action( 'youzify_after_youzify_template_content' );
echo do_blocks('<!-- wp:template-part {"slug":"footer","theme":"ncmaz-fse-theme"} /-->');
wp_footer();
echo ob_get_clean();
return null;
}
add_filter( 'youzify_template', 'yzc_override_youzify_template_using_block_based_template', 9 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment