<?php 
// Determine thumbnail format
if (is_author()) {
	$thum_format = glamer_options('glamer_authors_layout');
    $layout_style = glamer_options('glamer_author_grid_style', 'one');
} elseif (is_archive()) {
	$thum_format = glamer_options('glamer_archive_layout', 'right-sidebar');
    $layout_style = glamer_options('glamer_archive_grid_style', 'right-sidebar');
} elseif (is_search()) {
    $thum_format = glamer_options('glamer_search_layout', 'right-sidebar');
    $layout_style = glamer_options('glamer_search_grid_style', 'right-sidebar');
} else {
    $thum_format = glamer_options('glamer_blog_layout', 'right-sidebar');
    $layout_style = glamer_options('glamer_blog_grid_style', 'right-sidebar');
}

$layout_style_overwright = isset($_GET['style']) ? sanitize_text_field($_GET['style']) : $layout_style;
if( 'two' == $layout_style_overwright ){
    $thum_size = 'glamer-author-grid';
}else{
    $thum_size = 'glamer-large';
}

?>
<?php if (has_post_thumbnail()) : ?>
	<div class="post-thumbnail-wrapper">
        <?php the_post_thumbnail($thum_size); ?>
	</div>
<?php endif; ?>