64 lines
1.3 KiB
PHP
64 lines
1.3 KiB
PHP
<?php if (have_posts()): while (have_posts()): the_post();
|
|
static $qc = 0;
|
|
$qc++;
|
|
?>
|
|
|
|
|
|
<article id="post-<?php the_ID();?>" <?php post_class();?>>
|
|
|
|
<!-- post thumbnail -->
|
|
<?php if (has_post_thumbnail()): // Check if thumbnail exists ?>
|
|
<a class="thumbnailwrapper" href="<?php the_permalink();?>" title="<?php the_title();?>">
|
|
<?php if(is_home() and $qc < 3): ;
|
|
the_post_thumbnail('home-big-thumbnail');
|
|
else:
|
|
the_post_thumbnail('home-square-thumbnail');
|
|
endif;?>
|
|
</a>
|
|
<?php endif;?>
|
|
<!-- /post thumbnail -->
|
|
|
|
<div class="metadata">
|
|
<div class="categories">
|
|
<?php the_category(' | ');?>
|
|
|
|
<?php
|
|
$terms = get_the_terms($post->ID, 'Format');
|
|
if ($terms) {
|
|
foreach ($terms as $term) {
|
|
echo '| ';
|
|
echo $term->name;
|
|
}
|
|
}?>
|
|
|
|
</div>
|
|
<div class="postedon">
|
|
<?php the_time('Y. m. d.');?>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- post title -->
|
|
<h2>
|
|
<a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?></a>
|
|
</h2>
|
|
<!-- /post title -->
|
|
|
|
|
|
|
|
</article>
|
|
|
|
|
|
<?php endwhile;?>
|
|
|
|
<?php else: ?>
|
|
|
|
<!-- article -->
|
|
<article>
|
|
<h2><?php _e('Sorry, nothing to display.', 'dis2019');?></h2>
|
|
</article>
|
|
<!-- /article -->
|
|
|
|
<?php endif;?>
|