Skip to content

Commit

Permalink
add post-classes in the loop (#30497)
Browse files Browse the repository at this point in the history
* add post-classes in the loop

* Add wp-block-post class
  • Loading branch information
aristath authored Jun 30, 2021
1 parent a125447 commit 79e02a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/block-library/src/post-template/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ function render_block_core_post_template( $attributes, $content, $block ) {
)
)
)->render( array( 'dynamic' => false ) );
$content .= "<li>{$block_content}</li>";
$post_classes = esc_attr( implode( ' ', get_post_class( 'wp-block-post' ) ) );
$content .= '<li class="' . $post_classes . '">' . $block_content . '</li>';
}

wp_reset_postdata();
Expand Down

0 comments on commit 79e02a2

Please sign in to comment.