first commit
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<a href="<?php the_permalink( $blogItem->ID ); ?>">
|
||||
<div class="square-blog-block-format w-100 h-100 position-relative">
|
||||
<?php if (!empty(get_post_field('image_link_square_dimension', $blogItem->ID)) && $blockDimension === 'square'): ?>
|
||||
<div class="post-featured-img" style="background-image: url('<?php echo get_post_field('image_link_square_dimension', $blogItem->ID); ?>');"></div>
|
||||
<?php elseif (!empty(get_post_field('image_link_horizontal_rectangle_dimension', $blogItem->ID)) && $blockDimension === 'horizontal-rectangle'): ?>
|
||||
<div class="post-featured-img" style="background-image: url('<?php echo get_post_field('image_link_horizontal_rectangle_dimension', $blogItem->ID); ?>');"></div>
|
||||
<?php elseif (!empty(get_post_field('image_link_vertical_rectangle_dimension', $blogItem->ID)) && $blockDimension === 'vertical-rectangle'): ?>
|
||||
<div class="post-featured-img" style="background-image: url('<?php echo get_post_field('image_link_vertical_rectangle_dimension', $blogItem->ID); ?>');"></div>
|
||||
<?php else: ?>
|
||||
<?php //if (has_post_thumbnail( $blogItem->ID )) : ?>
|
||||
<!-- <img class="w-100 h-100" src="<?php echo get_the_post_thumbnail_url( $blogItem->ID, 'full' ); ?>"> -->
|
||||
<?php //endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="post-title position-absolute <?php echo $titleType == 'expand' ? 'expand-title' : 'short-title' ?>">
|
||||
<h2 class="font-weight-bold">
|
||||
<?php echo wp_trim_words( $blogItem->post_title, 10, '...' ); ?>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="post-description position-absolute <?php echo $metaSide == 'right-meta' ? 'right-meta' : 'left-meta' ?>">
|
||||
<?php if (has_excerpt($blogItem->ID)): ?>
|
||||
<p><?php echo wp_trim_words( get_the_excerpt( $blogItem->ID), 20, '...' ); ?></p>
|
||||
<?php else: ?>
|
||||
<p><?php echo wp_trim_words( get_post_field('post_content', $blogItem->ID), 20, '...' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="post-meta position-absolute <?php echo $metaSide == 'right-meta' ? 'right-meta' : 'left-meta' ?>">
|
||||
<span class="post-date">
|
||||
<i class="far fa-eye"></i>
|
||||
<?php echo get_the_date( 'M j, Y', $blogItem->ID ); ?>
|
||||
</span>
|
||||
<span class="ml-3">
|
||||
<i class="far fa-comment"></i> 0
|
||||
</span>
|
||||
<span class="ml-3">
|
||||
<i class="far fa-heart"></i> 0
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
Reference in New Issue
Block a user