diff --git a/wp-content/themes/pub/wporg-learn-2024/src/learning-pathway-cards/index.php b/wp-content/themes/pub/wporg-learn-2024/src/learning-pathway-cards/index.php index b9e7f055a..d87092eeb 100644 --- a/wp-content/themes/pub/wporg-learn-2024/src/learning-pathway-cards/index.php +++ b/wp-content/themes/pub/wporg-learn-2024/src/learning-pathway-cards/index.php @@ -38,17 +38,17 @@ function render( $attributes, $content, $block ) { $is_mini = isset( $attributes['isMini'] ) && $attributes['isMini']; if ( empty( $learning_pathways ) || is_wp_error( $learning_pathways ) ) { - return __( 'No learning pathways found.', 'wporg-learn' ); - } + $content = __( 'No learning pathways found.', 'wporg-learn' ); + } else { + $content = '
'; - $content = '
'; + foreach ( $learning_pathways as $learning_pathway ) { + $content .= $is_mini ? render_mini_card( $learning_pathway ) : render_full_card( $learning_pathway ); + } - foreach ( $learning_pathways as $learning_pathway ) { - $content .= $is_mini ? render_mini_card( $learning_pathway ) : render_full_card( $learning_pathway ); + $content .= '
'; } - $content .= '
'; - $wrapper_attributes = get_block_wrapper_attributes(); return sprintf( '
%2$s
',