Display Posts from a Category In Grid Like Manner

Status
Not open for further replies.

ven666detta

Active Member
430
2011
49
0
How to display posts from a certain category using their thumbnail in a grid like fashion?

For example:
I have a category USA Basketball and posts for each member of the team (with thumbnail). What I want to see in my sidebar is the posts under this category but only shows the thumbnails and also in a gridlike manner...
 
2 comments
try the code below and you will get a solution for your problem

cat_id is the category id;

<?php
query_posts('cat=cat_id');
while{have_posts()} : the_post();
?>
<div style="float:left;margin:5px;">
<?php the_post_thumbnail(); ?>
</div>
<?php endwhile; ?>
<div style='clear:both;'></div>
 
Status
Not open for further replies.
Back
Top