Can anyone spot anything wrong with this code(see below). No content is showing up on my page. Many thanks in advance.
<?php
$args = array(
'posts_per_page' => 3,
'orderby' => 'rand',
'category_name' => 'testimonials'
);
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
echo '<ul class="testimonials">';
while ( $query->have_posts() ) {
$query->the_post();
echo '<li class="clear">';
echo '<figure class="testimonial-thumb">';
the_post_thumbnail('testimonial-mug');
echo '</figure>';
echo '<aside class="testimonial-text">';
echo '<h3 class="testimonial-name">' . get_the_title() . '</h3>';
echo '<div class="testimonial-excerpt">';
the_content('');
echo '</div>';
echo '</aside>';
echo '</li>';
}
echo '</ul>';
}
wp_reset_postdata();
?>