<?php 

$grid_class = 'col-md-4';
if (!is_sticky(get_the_ID())) {
	//$ot_counter++;
	$grid_class = 'col-md-4';
} else {
	$grid_class = 'col-md-12';
}
$grid_class .= ' o-tpl tpl-grid-3'
?>
	<?php if ( is_sticky(get_the_ID())) : ?>
		<div class="wrapper sticky col-md-4">
	<?php endif;?>

		<article id="post-<?php the_ID(); ?>" <?php post_class($grid_class); ?>>
			<?php get_template_part( 'templates/posts/content', 'archive-grid' ); ?>
		</article>

	<?php if (is_sticky(get_the_ID())) : ?>
	</div>
	<?php endif;?>
