echo '<div class="spacer-20"></div>';
    }
}
?>
 
        <ul class="timeline">
      <?php 
$temp_wp_query = clone $wp_query;
$today = date('Y-m-d');
$currentTime = date(get_option('time_format'));
$upcomingEvents = '';
/*$event_category = get_post_meta(get_the_ID(),'imic_advanced_event_list_taxonomy',true);
if(!empty($event_category)){
$event_categories= get_term_by('id',$event_category,'event-category');
$event_category= $event_categories->slug; }*/
$event_category = imic_get_term_category(get_the_ID(), 'imic_advanced_event_list_taxonomy');
$event_add = imic_recur_events('future', 'nos', $event_category, '');
$nos_event = 1;
$month_check = 1;
$google_events = getGoogleEvent();
if (!empty($google_events)) {
    $new_events = $google_events + $event_add;
} else {
    $new_events = $event_add;
}
ksort($new_events);
$month_tag = '';
foreach ($new_events as $key => $value) {
    $frequency = get_post_meta(get_the_ID(), 'imic_event_frequency', true);
    $frequency_count = get_post_meta(get_the_ID(), 'imic_event_frequency_count', true);
    if ($month_tag != imic_global_month_name($key)) {
if (!is_home()) {
    while (have_posts()) {
        the_post();
        if ($post->post_content != "") {
            echo '<div class="page-content">';
            the_content();
            echo '</div>';
            echo '<div class="spacer-20"></div>';
        }
    }
}
/*$post_category = get_post_meta(get_the_ID(),'imic_advanced_post_taxonomy',true);
		if(!empty($post_category)){
		$post_categories= get_category($post_category);
		$post_category= $post_categories->slug; }*/
$post_category = imic_get_term_category(get_the_ID(), 'imic_advanced_post_taxonomy', 'category');
global $wp_query;
query_posts(array('post_type' => 'post', 'category_name' => $post_category, 'paged' => get_query_var('paged')));
if (have_posts()) {
    ?>
                <ul class="grid-holder col-3 events-grid">
                    <?php 
    while (have_posts()) {
        the_post();
        $custom_post = get_post_custom(get_the_ID());
        if ($thumbnails_option == 1) {
            echo '<li class="grid-item post format-standard">';
        } else {
            echo '<li class="grid-item post format-image">';
        }
        echo '<div class="grid-item-inner">';
$gallery_size = imicGetThumbAndLargeSize();
$size_thumb = $gallery_size[0];
$size_large = $gallery_size[1];
$custom_gallery_pagination = get_post_custom(get_the_ID());
$imic_gallery_pagination_columns_layout = $custom_gallery_pagination['imic_gallery_pagination_columns_layout'][0];
$posts_per_page = $custom_gallery_pagination['imic_gallery_pagination_to_show_on'][0];
$show_gallery_title = get_post_meta(get_the_ID(), 'imic_show_gallery_title', true);
/*$gallery_category = get_post_meta(get_the_ID(),'imic_advanced_gallery_taxonomy',true);
if(!empty($gallery_category)){
$gallery_categories= get_term_by('id',$gallery_category,'gallery-category');
if(!empty($gallery_categories)){
$gallery_category= $gallery_categories->slug;}
else{
$gallery_category='';    
}}*/
$gallery_category = imic_get_term_category(get_the_ID(), 'imic_advanced_gallery_taxonomy', 'gallery-category');
if ($imic_gallery_pagination_columns_layout == 3) {
    $class = 'col-md-4 col-sm-4';
} elseif ($imic_gallery_pagination_columns_layout == 4) {
    $class = 'col-md-3 col-sm-3';
} else {
    $class = 'col-md-6 col-sm-6';
}
echo '<div class="container">';
echo '<div class="row">';
?>
<div class="col-md-<?php 
echo $column_class;
?>
" id="content-col">
<?php 
    }
    ?>
            </div>
        </div>
    </div>
</div>
<!-- Start Featured Gallery -->
<?php 
}
$posts_per_page = get_post_meta($home_id, 'imic_galleries_to_show_on', true);
$imic_imic_galleries = get_post_meta($home_id, 'imic_imic_galleries', true);
/*$gallery_category = get_post_meta($home_id,'imic_home_gallery_taxonomy',true);
if(!empty($gallery_category)){
$gallery_categories= get_term_by('id',$gallery_category,'gallery-category');
$gallery_category= $gallery_categories->slug; }*/
$gallery_category = imic_get_term_category($home_id, 'imic_home_gallery_taxonomy', 'gallery-category');
$posts_per_page = !empty($posts_per_page) ? $posts_per_page : 3;
$temp_wp_query = clone $wp_query;
$gallery_bg_image_id = get_post_meta($home_id, 'imic_galleries_background_image', true);
$gallery_bg_image = wp_get_attachment_image_src($gallery_bg_image_id, 'full');
query_posts(array('post_type' => 'gallery', 'posts_per_page' => $posts_per_page, 'gallery-category' => $gallery_category));
if (have_posts() && $imic_imic_galleries == 1) {
    $gallery_size = imicGetThumbAndLargeSize();
    $size_thumb = $gallery_size[0];
    $size_large = $gallery_size[1];
    ?>
    <div class="featured-gallery <?php 
    if ($gallery_bg_image != '') {
        echo 'parallax parallax8';
    }
    ?>