<?php

/**
 * Template part for displaying staff single media.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package Learning_Institute
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
global $redux_wpsp;
?>
<div id="staff-single-media" class="staff-single-media">
	<?php 
wpsp_get_post_thumbnail('thumb-portrait');
?>
</div> <!-- .staff-single-media -->
    /**
     * post shortcode
     *
     * Options: Show all post / by Category
     *
     */
    function wpsp_post_shortcode($atts, $content = null)
    {
        ob_start();
        extract(shortcode_atts(array('term_id' => null, 'post_format' => null, 'post_meta' => null, 'post_excerpt' => null, 'post_style' => null, 'post_offset' => null, 'post_count' => null, 'cols' => null), $atts));
        //$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
        $args = array();
        if ($post_format != 'post-format-standard') {
            $args = array('tax_query' => array(array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array($post_format), 'operator' => 'IN')));
        }
        if ($post_offset != '') {
            $args = array('offset' => $post_offset);
        }
        $defaults = array('post_type' => 'post', 'category__in' => $term_id, 'posts_per_page' => $post_count, 'tax_query' => array(array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array('post-format-quote', 'post-format-audio', 'post-format-gallery', 'post-format-image', 'post-format-link', 'post-format-video'), 'operator' => 'NOT IN')));
        $args = wp_parse_args($args, $defaults);
        extract($args);
        $post_query = new WP_Query($args);
        if ($post_query->have_posts()) {
            ?>
		<div class="wpsp-row clearfix">
		<?php 
            while ($post_query->have_posts()) {
                $post_query->the_post();
                ?>
		<?php 
                // entry-class
                $entry_classes = array('entry-blog-article');
                $entry_classes[] = $post_style;
                $entry_classes[] = 'col';
                $entry_classes[] = wpsp_grid_class($cols);
                ?>
	
				<article id="post-<?php 
                the_ID();
                ?>
" <?php 
                post_class($entry_classes);
                ?>
>
				<?php 
                if ('overlay-2' == $post_style) {
                    ?>
					<div class="post-thumbnail-wrap overlay-2">
						<div class="post-thumbnail"><?php 
                    wpsp_get_post_thumbnail('thumb-full');
                    ?>
</div>
						<div class="caption-wrap">
							<div class="caption-inner">
							<a href="<?php 
                    wpsp_permalink();
                    ?>
" title="<?php 
                    echo wpsp_esc_title();
                    ?>
" rel="bookmark"><span class="title"><?php 
                    the_title();
                    ?>
</span></a>
							</div>
						</div>
					</div>
				<?php 
                } else {
                    ?>
	
					<?php 
                    printf('<div class="post-thumbnail"><a itemprop="url" href="%1$s" rel="bookmark" title="%2$s">%3$s</a></div>', wpsp_get_permalink(), wpsp_get_esc_title(), wpsp_post_thumbnail('thumb-full'));
                    ?>
					<div class="entry-post-content-wrap">
						<div class="entry-blog-content">
						<?php 
                    get_template_part('template-parts/blog/blog-entry-title');
                    ?>
	
						<?php 
                    if ($post_meta) {
                        get_template_part('template-parts/blog/blog-entry-meta');
                    }
                    ?>
						</div>
						<?php 
                    if ($post_excerpt) {
                        get_template_part('template-parts/blog/blog-entry-excerpt');
                    }
                    ?>
					</div> <!-- .entry-post-content-wrap -->
				<?php 
                }
                ?>
		
				</article><!-- #post-## -->
		<?php 
            }
            wp_reset_postdata();
            ?>
		</div>

		<?php 
            // Pagination
            /* if(function_exists('wp_pagenavi'))
                   wp_pagenavi();
               else 
                   wpsp_paging_nav($post_query->max_num_pages); */
            ?>
	<?php 
        } else {
            echo esc_html__('Sorry, new content will coming soon.', 'learninginstitute');
        }
        return ob_get_clean();
    }
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
global $redux_wpsp;
// Get single blog layout blocks
$video = wpsp_get_post_video_html();
// Get single blog layout blocks
$post_format = get_post_format();
?>

<?php 
if ($video && 'video' == $post_format) {
    ?>
	
	<?php 
    printf('<div class="blog-entry-video">%s</div>', wpsp_get_post_video_html());
} else {
    ?>
		<div id="blog-entry-media" class="blog-entry-media">
			<div class="post-thumbnail">	
			<?php 
    wpsp_get_post_thumbnail('thumb-full');
    ?>
			</div> <!-- .post-thumbnail -->
		</div> <!-- .blog-entry-media -->
<?php 
}
?>