%s', 'chateau' ), get_the_date() ); elseif ( is_month() ) : printf( __( 'Monthly Archives: %s', 'chateau' ), get_the_date( 'F Y' ) ); elseif ( is_year() ) : printf( __( 'Yearly Archives: %s', 'chateau' ), get_the_date( 'Y' ) ); elseif ( is_category() ) : printf( __( 'Category Archives: %s', 'chateau' ), single_cat_title( '', false ) ); elseif ( is_tag() ) : printf( __( 'Tag Archives: %s', 'chateau' ), single_tag_title( '', false ) ); elseif ( is_author() ) : printf( __( 'Author Archives: %s', 'chateau' ), get_the_author() ); else : _e( 'Blog Archives', 'chateau' ); endif; ?>
post_count; //determine total number of items
while ( $the_query->have_posts() ) : $the_query->the_post(); //loop!
//set $is_start_of_new_colum true when post count is dividable by the number of items
$is_start_of_new_column = 0 === ( $count % $col_size );
//set $is_end_of_column when both $count and $is_start_of_new_column are true
$is_end_of_column = ( $count && $is_start_of_new_column );
$count++; //update count counter
$is_start_of_new_column && $column++; //update column counter
if ( $is_end_of_column )
print( '
' );
if ( $is_start_of_new_column )
print( '' );
get_template_part( 'content', 'list' );
endwhile;
print( '
' );
?>