# getwid/2.2.0/includes/templates/post-carousel/post.php

Getwid – Gutenberg Blocks, version 2.2.0. 32 lines.

- Page: https://pluginprobe.com/plugins/getwid/2.2.0/code/includes/templates/post-carousel/post.php
- Raw: https://pluginprobe.com/plugins/getwid/2.2.0/raw/includes/templates/post-carousel/post.php
- Modified: 2024-10-25T10:23:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/getwid/2.2.0/code/includes/templates/post-carousel/post.php#L10-L20`.

```php
<?php
/**
 * The template for displaying all single posts in Post Carousel block
 */

$base_class = $extra_attr['block_name'];

?>

<div class="<?php echo esc_attr( $base_class . '__post' ); ?>">
    <?php if ( has_post_thumbnail() ): ?>
        <div class="<?php echo esc_attr( $base_class . '__post-thumbnail' ); ?>">
            <a href="<?php echo esc_url( get_permalink() ); ?>"><?php
                the_post_thumbnail();
                ?></a>
        </div>
    <?php endif; ?>
    <div class="<?php echo esc_attr( $base_class . '__post-content-wrapper' ); ?>">
        <div class="<?php echo esc_attr( $base_class . '__post-header') ; ?>">
            <?php
			the_title(
				'<h3 class="' . esc_attr( $base_class . '__post-title' ) . '"><a href="' . esc_url( get_permalink() ) . '">',
				'</a></h3>'
			); ?>
        </div>
        <div class="<?php echo esc_attr( $base_class . '__post-excerpt' ); ?>"><?php
            the_excerpt();
        ?></div>
    </div>
</div>


```
