From 156b957f0d2788575efe1c121bdef956bc02fa62 Mon Sep 17 00:00:00 2001 From: Herb Miller Date: Sun, 7 Aug 2022 17:01:06 +0100 Subject: [PATCH] Cater for Gutenberg not activated #34 --- includes/post-template.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/post-template.php b/includes/post-template.php index 0aa9d79..8fbbce9 100644 --- a/includes/post-template.php +++ b/includes/post-template.php @@ -51,7 +51,11 @@ function sb_render_block_core_post_template( $attributes, $content, $block ) { $attributes['limit' ] = $limit; $html .= sb_render_block_core_post_template_main_query( $attributes, $content, $block ); } else { - $html .= gutenberg_render_block_core_post_template($attributes, $content, $block); + if ( function_exists('gutenberg_render_block_core_post_template')) { + $html .= gutenberg_render_block_core_post_template($attributes, $content, $block); + } else { + $html .= render_block_core_post_template($attributes, $content, $block); + } } return $html; }