Advertisement
gregrickaby

Basic WordPress Loop

Dec 2nd, 2011
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. <div id="featured_posts">
  2. <?php $sub_loop_1 = new WP_Query("cat=1&showposts=1"); while ($sub_loop_1->have_posts()) : $sub_loop_1->the_post(); ?>
  3. <div>
  4. <a href="<?php the_permalink(); ?>" /><h2 class="featured_post_title"><?php the_title(); ?></h2></a>
  5. <p class="featured_post_excerpt"><?php the_excerpt(); ?></p>
  6. </div>
  7. <?php endwhile; ?>
  8. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement