Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // columna 1
- $args = array("posts_per_page" => 5);
- query_posts($args);
- if (have_posts()) {
- ?>
- <div style="float: left; width: 200px;">
- <?php while (have_posts()) { the_post(); $do_not_duplicate[] = $post->ID; ?>
- <div>
- <h2><?php the_title(); ?></h2>
- <div class="the_excerpt"><?php the_excerpt(); ?></div>
- </div>
- <?php } ?>
- </div>
- <?php } ?>
- <?php
- // columna 2
- $args = array("posts_per_page" => 5, "post__not_in" => $do_not_duplicate);
- query_posts($args);
- if (have_posts()) { $i = 0;
- ?>
- <div style="float: right; width: 200px;">
- <?php while (have_posts()) { the_post(); if (in_array($post->ID, $do_not_duplicate)) continue; ?>
- <div>
- <h2><?php the_title(); ?></h2>
- <div class="the_excerpt"><?php the_excerpt(); ?></div>
- </div>
- <?php } ?>
- </div>
- <?php } ?>
- <div style="clear: both"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement