/**
     * 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();
    }
/**
 * Echo escaped post title
 *
 * @since 1.0.0
 */
function wpsp_esc_title()
{
    echo wpsp_get_esc_title();
}
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
?>


<?php 
$logos = rwmb_meta('wpsp_partner_logo', array('type' => 'image_advanced', 'size' => 'large'));
$logo_url = rwmb_meta('wpsp_partner_url') ? rwmb_meta('wpsp_partner_url') : '#';
?>

<a href="<?php 
echo $logo_url;
?>
" rel="bookmark" title="<?php 
echo wpsp_get_esc_title();
?>
" target="_blank">
	<?php 
foreach ($logos as $logo) {
    ?>
		<img src="<?php 
    echo $logo['full_url'];
    ?>
">
	<?php 
}
?>
</a>
<?php

/**
 * Template part for displaying portfolio thumbnail.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package Learning_Institute
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
?>


<?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-landscape'));
Example #5
0
$args = array('post_type' => 'post', 'posts_per_page' => 1, 'tax_query' => array(array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array('post-format-video'), 'operator' => 'IN')));
$video_post_query = new WP_Query($args);
if ($video_post_query->have_posts()) {
    while ($video_post_query->have_posts()) {
        $video_post_query->the_post();
        ?>

	<section class="latest-video-wrap">
		<div class="container">
			<div <?php 
        post_class(array('latest-video', 'wpsp-row', 'clearfix'));
        ?>
>
			<div class="col span_1_of_2">
				<?php 
        printf('<div class="post-thumbnail"><a class="popup-youtube" itemprop="url" href="%1$s" rel="bookmark" title="%2$s">%3$s</a></div>', wpsp_get_post_video(), wpsp_get_esc_title(), wpsp_post_thumbnail('blog-post'));
        ?>
			</div>
			<div class="col span_1_of_2">
				<?php 
        get_template_part('template-parts/blog/blog-entry-title');
        ?>
				<?php 
        get_template_part('template-parts/blog/blog-entry-meta');
        ?>
				<?php 
        get_template_part('template-parts/blog/blog-entry-excerpt');
        ?>
			</div>
			</div> <!-- .latest-video -->
		</div> <!-- .container -->