2022-12-22 12:54:15 +01:00
|
|
|
<?php $related = splits_related_posts(); ?>
|
2020-03-11 14:32:45 +01:00
|
|
|
|
|
|
|
<?php if ( $related->have_posts() ): ?>
|
|
|
|
|
|
|
|
<h4 class="heading">
|
2022-12-22 12:54:15 +01:00
|
|
|
<i class="fas fa-hand-point-right"></i><?php esc_html_e('You may also like...','splits'); ?>
|
2020-03-11 14:32:45 +01:00
|
|
|
</h4>
|
|
|
|
|
|
|
|
<ul class="related-posts group">
|
|
|
|
|
|
|
|
<?php while ( $related->have_posts() ) : $related->the_post(); ?>
|
|
|
|
<li class="related post-hover">
|
|
|
|
<article <?php post_class(); ?>>
|
|
|
|
|
|
|
|
<div class="post-thumbnail">
|
|
|
|
<a href="<?php the_permalink(); ?>">
|
|
|
|
<?php if ( has_post_thumbnail() ): ?>
|
2022-12-22 12:54:15 +01:00
|
|
|
<?php the_post_thumbnail('splits-medium'); ?>
|
2020-03-11 14:32:45 +01:00
|
|
|
<?php elseif ( get_theme_mod('placeholder','on') == 'on' ): ?>
|
2020-07-13 17:55:52 +02:00
|
|
|
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/img/thumb-medium.png" alt="<?php the_title_attribute(); ?>" />
|
2020-03-11 14:32:45 +01:00
|
|
|
<?php endif; ?>
|
|
|
|
<?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon small"><i class="fas fa-play"></i></span>'; ?>
|
|
|
|
<?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon small"><i class="fas fa-volume-up"></i></span>'; ?>
|
|
|
|
<?php if ( is_sticky() ) echo'<span class="thumb-icon small"><i class="fas fa-star"></i></span>'; ?>
|
|
|
|
</a>
|
|
|
|
<?php if ( comments_open() && ( get_theme_mod( 'comment-count','on' ) == 'on' ) ): ?>
|
|
|
|
<a class="post-comments" href="<?php comments_link(); ?>"><span><i class="fas fa-comments"></i><?php comments_number( '0', '1', '%' ); ?></span></a>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div><!--/.post-thumbnail-->
|
|
|
|
|
|
|
|
<div class="related-inner">
|
|
|
|
|
|
|
|
<h4 class="post-title">
|
|
|
|
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
|
|
|
|
</h4><!--/.post-title-->
|
|
|
|
|
|
|
|
</div><!--/.related-inner-->
|
|
|
|
|
|
|
|
</article>
|
|
|
|
</li><!--/.related-->
|
|
|
|
<?php endwhile; ?>
|
|
|
|
<?php wp_reset_postdata(); ?>
|
|
|
|
|
|
|
|
</ul><!--/.post-related-->
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?php wp_reset_postdata(); ?>
|