<?php

/**
 * @Packge     : Daltech
 * @Version    : 1.0
 * @Author     : Daltech
 * @Author URI : https://themeforest.net/user/ModinaTheme/portfolio
 *
 */

// Block direct access
if (!defined('ABSPATH')) {
    exit;
}
$image_url = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
?>
<!-- Single Post -->
<div <?php post_class(); ?>>
    <?php
    if (has_post_thumbnail()) {
        $class = 'post-featured-thumb bg-cover';
    } else {
        $class = 'post-featured-thumb bg-cover thumb-less';
    }
    ?>
    <?php if (!empty(has_post_thumbnail())) : ?>
        <div class="<?php echo esc_attr($class); ?>" style="background-image: url(<?php echo esc_url($image_url); ?>);">
            <div class="post-date">
                <h4>
                    <?php echo get_the_date(); ?>
                </h4>
            </div>
        </div>
    <?php endif; ?>
    <?php
    // Blog Post Content
    do_action('daltech_blog_post_content');
    // Excerpt And Read More Button
    ?>
</div>
<!-- End Single Post -->