Make recent posts float left using one div for each post
I'm working on a WordPress static site where I want to display some recent
posts.
I'm able to display the recent posts, but I want each recent post to be
inside of a div on it's own. This is the code I'm currently using:
<div id="senastebox">
<?php $the_query = new WP_Query( 'showposts=3' ); ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<a href="<?php the_permalink() ?>"><?php the_post_thumbnail(
array(100,100) ); ?></a>
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
<?php the_excerpt(); ?>
<a href="<?php the_permalink() ?>">Read More...</a>
<?php endwhile;?>
</div>
How do I assign a div to each and one of the displayed recent posts?
No comments:
Post a Comment