Recently I have developed a theme almost identical to yours.
This is how you can achieve this:
Basic idea is, create two different layouts: layout-three.php
and layout-two.php
We will call them based on requirement. I have used an array to achieve this.
Below is the sample code for the template file (assuming you will show 5 posts per page and you already have your query and code structure ready):
$layout_call = array (
'1' => 'three',
'2' => 'three',
'3' => 'three',
'4' => 'two',
'5' => 'two'
);
$args = array (
'cat' => 1, // <------edit with your desired category ID
'posts_per_page' => 5
);
$query = new WP_Query($args);
if ( $query->have_posts() ) :
while ( $query->have_posts() ) : $query->the_post();
$counter = 1;
get_template_part( 'layout', $layout_call[$counter] );
$counter++;
endwhile;
endif;
Now in your layout-three.php
, write code for one small block out of three blocks of first part, and in layout-two.php
, write code for one medium block of two blocks of second part.
That will do the trick.