Create a postgrid (2 columns)
-
Hi!
Ive have a row of 4 posts, and i want to make a grid out of it, 2 top, 2 bottom. Anyone who cant point me in the right direction? Been scanning google for a while but cant get it to work properly. This is the code im trying to get a grid out of:
<div class="views"> <div id="poppost">Popul?rt</div> <ul id="popular-comments"> <?php $pc = new WP_Query('orderby=comment_count&posts_per_page=4'); ?> <?php while ($pc->have_posts()) : $pc->the_post(); ?> <div class="span-12<?php if (($i%4)==0) { ?> last<?php } ?>"> <li> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s','gpp_i18n'),the_title_attribute('echo=0')); ?>"><?php the_post_thumbnail('310x150'); ?></a> <div class="title-overlay3"> h7 class="titel5"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s','gpp_i18n'),the_title_attribute('echo=0')); ?>"><?php the_title() ?></a></h7> </div> <p> </li> <?php endwhile; ?> </ul> </div>
Thanks!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Create a postgrid (2 columns)’ is closed to new replies.