I´d like to link the_post_thumbnail by using the the_permalink.
I do this (It Works without link)
<?php $args = array( 'post_type' => 'xyz', 'posts_per_page' => -1, 'orderby' => 'rand' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
the_post_thumbnail('wine-flow', array('class' => 'item'));
endwhile; ?>
And I´d like to do further this: (Syntax Error)
<?php $args = array( 'post_type' => 'xyz', 'posts_per_page' => -1, 'orderby' => 'rand' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
<?php the_post_thumbnail('wine-flow', array('class' => 'item')); ?>
</a>
endwhile; ?>
Thanks
ogni
