Include last post date in get_categories loop
I have a simple get_categories loop on a template page which works fine to display a list of categories within the parent category 52 (as shown below).
I would like to also display the last post date with each category so it displays the date of the latest posts within the category. Is this possible:
?php
$args = array('parent' = 52);
$categories = get_categories( $args );
foreach($categories as $category) {
echo 'pCategory: a href=' . get_category_link( $category-term_id ) . ' title=' . sprintf( __( View all posts in %s ), $category-name ) . ' ' . '' . $category-name.'/a /p ';
echo 'p Description:'. $category-description . '/p';
echo 'p Post Count: '. $category-count . '/p';
}
?
Thank you
Luke