Small thumbnails on home
This commit is contained in:
11
loop.php
11
loop.php
@@ -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 -->
|
||||
|
||||
Reference in New Issue
Block a user