My client has a website which lists 3 thumbnails, this is great but I need to get a cropped version of the thumbnail rather than the default thumbnail. The thumbnail class is called "type-one".
<?php
$i = 0;
//$query = new WP_Query( array('category_in' => array_merge(array('6'),$subcats)) );
//$query = new WP_Query( 'post_type=page&post_parent=35&posts_per_page=3' );
$query = new WP_Query( array(
'post_type' => 'page',
'post_parent' => 35,
'post__not_in' => array( $post->ID ),
'posts_per_page' => 3
)
);
if ( $query->have_posts() ){
while ( $query->have_posts() ){
$query->the_post();
$fields = get_fields();
$i++;
?>
<div class="large-4 medium-4 small-6 columns">
<?php if( $fields['featured_image'] ) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php echo $fields['featured_image']['url']; ?>" alt="<?php echo $fields['featured_image']['alt']; ?>" class="margin-bottom" /></a>
<?php } ?>
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<?php echo $fields['introduction']; ?>
</div>
<?php
} // while
} // if have posts
?>