Pull Excerpt from Specific Category
-
http://www.ahy4life.com/update_20121008/promos.php right column, center section
How do I mod/replace the code below to pull an excerpt from a specific category so that the title populates the top and the excerpt populates the bottom as in <http://www.ahy4life.com/events.php>?
<?php $featuredPosts = new WP_Query(); $featuredPosts->query('showposts=5&cat=8'); while ($featuredPosts->have_posts()) : $featuredPosts->the_post(); ?> <h2><center><?php the_title(); ?></center></h2> <?php the_excerpt(); ?> <?php endwhile; ?>
[Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Pull Excerpt from Specific Category’ is closed to new replies.