Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am displaying the recent products in a page, how to display the short description along with the products.

share|improve this question
Excerpt – Jeremy Jared Dec 25 '12 at 9:07

1 Answer

<?php

$args = array('numberposts' => '50', 'offset' => '',   
              'category' => 'product_type', 
               'orderby' => 'post_date',
               'order' => 'DESC', 'include' => '', 
               'exclude' => '', 'meta_key' => '',
               'meta_value' => '', 
               'post_type' => 'product',   
               'post_mime_type' => '',   
               'post_parent' => '',  
               'post_status' => 'publish', 
               'suppress_filters' => true );

$products = get_posts($args);

foreach($products as $product) {

 echo $product->post_title;

 echo get_the_post_thumbnail( $product->ID);

 echo $product->post_content;
}

?>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.