hello all. happy sunday.
this is what i have:
am reworking my site. and want to play w/using masonry. i have create a grid and would like to display the posts w/my image.
this is the code i have
<div class="item"> <div class="item-content"> <?php $args = array( 'category_name' => 'illustrations', 'posts_per_page' => 1 ); $my_query = new WP_Query( $args ); if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); the_post_thumbnail('img240x240'); the_category(); endwhile; endif; wp_reset_query(); ?> </div> </div>
Which works great. but for only one most post. for more than that it will show the second right below it rather than in a second individual slot.