enter image description here
<?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 '<h3>'.$cat->name.'</h3>';

    while ($my_query->have_posts()) : $my_query->the_post(); ?>     
    <?php /*general loop output; for instance: */ ?>
    <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>    <br />  

    <?php endwhile; ?>

    <?php else : 
    echo 'No Posts for '.$cat->name;                
    endif; 

endforeach; ?>
  • Here is what I want to have

Read more here: How to display WordPress archive into three columns


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: