Skip to content

Commit

Permalink
Fix infinite loop on single command pages
Browse files Browse the repository at this point in the history
Temporarily stop calling the_excerpt

See #277
  • Loading branch information
adamwoodnz committed Sep 13, 2023
1 parent 6b718d1 commit 2b5f32f
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ function render( $attributes, $content, $block ) {
$content .= '</a>';
$content .= '</h1>';

$excerpt = get_the_excerpt( $post_ID );
if ( $excerpt ) {
$content .= '<p class="excerpt">' . $excerpt . '</p>';
}
// TODO: Reinstate excerpt. This is causing an infinite loop, see https://github.com/WordPress/wporg-developer/issues/277
// $excerpt = get_the_excerpt( $post_ID );
// if ( $excerpt ) {
// $content .= '<p class="excerpt">' . $excerpt . '</p>';
// }

$wrapper_attributes = get_block_wrapper_attributes();
return sprintf(
Expand Down

0 comments on commit 2b5f32f

Please sign in to comment.