Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $args = array(
- 'showposts' => 4,
- 'tag' => 'top'
- );
- $topstories = new WP_Query($args);
- if ($topstories->have_posts() ) : while ($topstories->have_posts() ) : $topstories->the_post(); $storycount++;
- if ($storycount == 1 ) { /* Post 1 only*/ ?>
- <div>
- <h2><?php the_title(); ?></h2>
- <?php the_excerpt(); ?>
- </div>
- <?php } else { /* Posts 2-4 */?>
- <div>
- <h4><?php the_title(); ?></h4>
- </div>
- </div>
- <?php } ?>
- <?php endwhile; endif; ?>
- <?php wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement