diff --git a/packages/block-library/src/template-part/index.php b/packages/block-library/src/template-part/index.php index bef49341d7bb5..7a77e0c4cfcf3 100644 --- a/packages/block-library/src/template-part/index.php +++ b/packages/block-library/src/template-part/index.php @@ -128,14 +128,14 @@ function render_block_core_template_part( $attributes ) { } // Run through the actions that are typically taken on the_content. + $content = shortcode_unautop( $content ); + $content = do_shortcode( $content ); $seen_ids[ $template_part_id ] = true; $content = do_blocks( $content ); unset( $seen_ids[ $template_part_id ] ); $content = wptexturize( $content ); $content = convert_smilies( $content ); - $content = shortcode_unautop( $content ); $content = wp_filter_content_tags( $content ); - $content = do_shortcode( $content ); // Handle embeds for block template parts. global $wp_embed;