Show Excerpt of Latest Post


$args = array('numberposts'=>1,'category' => 1);
$myposts = get_posts($args);
foreach($myposts as $post) : setup_postdata($post); ?>


Full list of parameters:

$args = array(
'numberposts' => 5,
'offset' => 0,
'category' => ,
'orderby' => 'post_date',
'order' => 'DESC',
'include' => ,
'exclude' => ,
'meta_key' => ,
'meta_value' => ,
'post_type' => 'post',
'post_mime_type' => ,
'post_parent' => ,
'post_status' => 'publish' );
?>

Leave a Comment