content-video.php (1408B)
1 <?php 2 /** 3 * Template part for displaying posts 4 * 5 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ 6 * 7 * @package appside 8 */ 9 $appside = Appside(); 10 $post_meta = get_post_meta(get_the_ID(),'appside_post_video_options',true); 11 $video_url = isset($post_meta['video_url']) && $post_meta['video_url'] ? $post_meta['video_url'] : ''; 12 ?> 13 <article id="post-<?php the_ID(); ?>" <?php post_class('single-blog-classic-item margin-bottom-30'); ?>> 14 <?php 15 if (has_post_thumbnail()): 16 ?> 17 <div class="thumb"> 18 <?php $appside->post_thumbnail(); ?> 19 <div class="time"> 20 <span class="date"><?php echo esc_html(get_the_date('d'))?></span> 21 <span class="month"><?php echo esc_html(get_the_date('M'))?></span> 22 </div> 23 <?php if(!empty($video_url)): ?> 24 <div class="hover"> 25 <a href="<?php echo esc_url($video_url);?>" class="video-play-btn mfp-iframe"><i class="fa fa-play"></i></a> 26 </div> 27 <?php endif; ?> 28 </div> 29 <?php endif;?> 30 <div class="content"> 31 <?php 32 get_template_part('template-parts/common/post-meta'); 33 the_title( '<h2 class="title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); 34 get_template_part('template-parts/common/post-excerpt'); 35 ?> 36 </div> 37 </article><!-- #post-<?php the_ID(); ?> -->