Small thumbnails on home

This commit is contained in:
2019-06-06 04:08:42 +02:00
parent 2450fc6da5
commit 647e333a16
14 changed files with 575 additions and 117 deletions

View File

@@ -1,4 +1,7 @@
<?php if (have_posts()): while (have_posts()): the_post();?>
<?php if (have_posts()): while (have_posts()): the_post();
static $qc = 0;
$qc++;
?>
<article id="post-<?php the_ID();?>" <?php post_class();?>>
@@ -6,7 +9,11 @@
<!-- post thumbnail -->
<?php if (has_post_thumbnail()): // Check if thumbnail exists ?>
<a class="thumbnailwrapper" href="<?php the_permalink();?>" title="<?php the_title();?>">
<?php the_post_thumbnail('home-thumbnail');?>
<?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 -->