Created
October 31, 2024 16:54
-
-
Save KaineLabs/6501bfb725fa696c28dc658d02230fe5 to your computer and use it in GitHub Desktop.
Youzify - Fix Block Based Theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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