[insert_php] $cats = get_categories(‘child_of=’.get_query_var(‘cat’));
foreach ($cats as $cat) :
$args = array(
‘posts_per_page’ => 3, // max number of post per category
‘category__in’ => array($cat->term_id)
);
$my_query = new WP_Query($args);
if ($my_query->have_posts()) :
echo ‘
‘.$cat->name.’
‘;