Jump to content

Worpress 3.4.2: How To Pull An Excerpt From A Category


biggupp

Recommended Posts

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; ?>

"

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.