I'm trying to organize a display of posts in the category 'garage' on one page of my site.
The top half of the page displays permanent content, and the bottom half of the page is supposed to display a list of posts in the 'garage' category.
I want them to display in a sort of grid with the title directly below the thumbnail. So far the grid and thumbnails are working, but the title is displaying to the right of the thumbnail and not directly under the thumbnail.
I'd link to the site but its currently not publicly visible since I'm still building it.
here's my code:
<?php $my_query = new WP_Query('post_type=post&category_name=Garage'); while ($my_query->have_posts()) : $my_query->the_post(); ?> <a href="<?php the_permalink();?>"><?php the_post_thumbnail('thumbnail');?><?php the_title();?></a> <?php endwhile; ?>
Is there a change I can make in the loop code to get the title to display directly underneath the thumbnail. I've tried using but it ruins the grid effect by putting each thumbnail on a new line. Perhaps I just didn't place it correctly. Thanks in advance for the help!
[moderator note: several duplicate topics removed - please start only one topic per problem - http://codex.wordpress.org/Forum_Welcome#Where_To_Post ]