File: //home/madepabj/gamepointpk.com/wp-content/themes/groovy/partials/loops/classic-article.php
<?php
$epcl_theme = epcl_get_theme_options();
$epcl_module = epcl_get_module_options();
$index = absint( get_query_var('index') );
$post_class = $optimized_image = '';
$post_id = get_the_ID();
$post_meta = get_post_meta( $post_id, 'epcl_post', true );
$post_gallery = get_post_meta( $post_id, 'epcl_post_gallery', true );
$post_meta_audio = get_post_meta( $post_id, 'epcl_post_audio', true );
$post_meta_video = get_post_meta( $post_id, 'epcl_post_video', true );
$loop_post_style = 'small-image'; // Small/Vertical image
if( !empty($post_meta) && isset($post_meta['loop_style']) ){
if( epcl_get_option('classic_loop_style', 'inherit') !== 'inherit' ){
$post_meta['loop_style'] = epcl_get_option('classic_loop_style', 'inherit');
}
}
$post_format = get_post_format();
if( defined('EPCL_PLUGIN_PATH') ){
if( $post_format == 'gallery' || $post_format == 'video' || $post_format == 'audio' ){
$post_meta['loop_style'] = 'classic-image';
}
}
// Get loop style (small image or standard)
if( !empty($post_meta) && isset($post_meta['loop_style']) && $post_meta['loop_style'] != '' ){
$loop_post_style = $post_meta['loop_style'];
$post_class .= 'post-style-'.$post_meta['loop_style'];
}
if( ($post_format !== 'gallery' ) && !has_post_thumbnail() ){
$optimized_image = '';
if( defined('EPCL_PLUGIN_PATH') && !empty($post_meta['optimized_image']['url']) && $post_meta['optimized_image']['url'] != '' ){
$optimized_image = $post_meta['optimized_image'];
}
if( !$optimized_image ){
$post_class .= ' no-thumb';
}
}
set_query_var( 'epcl_post_style', 'classic' );
$post_class .= ( $index % 2 ) ? ' even' : ' odd';
$reading_time = epcl_reading_time( get_the_content() );
if( epcl_get_option('post_title_layout', 'inside_images') == 'below_images' ){
$post_class.= ' title-below-images';
}
$author_id = get_the_author_meta('ID');
$user_meta = get_user_meta( $author_id, 'epcl_user', true );
$author_avatar = epcl_get_author_avatar($user_meta, $author_id);
$author_name = get_the_author();
$reading_time = epcl_reading_time( get_the_content() );
$enable_author = true;
if( !is_single() && epcl_get_option('classic_display_author', true) == '0'){
$enable_author = false;
}
if( is_single() && epcl_get_option('enable_author_top', true) == '0'){
$enable_author = false;
}
// Primary category (optional)
$post_class = epcl_get_primary_category( $post_class, $post_meta, $post_id );
?>
<article <?php post_class('epcl-flex bg-box default classic-large grid-100 tablet-grid-100 index-'.$index.' '.$post_class); ?>>
<div class="post-format-wrapper">
<?php epcl_display_post_format( get_post_format(), $post_id ); ?>
</div>
<div class="info">
<?php if( $loop_post_style == 'small-image' && ( $post_format !== 'gallery' ) ): ?>
<header>
<!-- start: .meta -->
<div class="meta-wrapper epcl-flex">
<?php if( get_the_category() ): ?>
<div class="tags">
<?php echo epcl_get_primary_category_link( $post_meta, $post_id ); ?>
</div>
<?php endif; ?>
<?php get_template_part('partials/meta-info'); ?>
<div class="clear"></div>
</div>
<!-- end: .meta -->
<h1 class="main-title title large underline-effect"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
</header>
<?php endif; ?>
<?php if( empty($epcl_theme) || $epcl_theme['classic_display_excerpt'] !== '0' ): ?>
<div class="post-excerpt">
<?php the_excerpt(); ?>
<div class="clear"></div>
</div>
<?php else: ?>
<div class="epcl-spacing"></div>
<?php endif; ?>
<footer class="bottom">
<div class="meta bottom">
<a href="<?php the_permalink(); ?>" class="continue-reading epcl-button white active"><?php echo esc_html__('Continue Reading', 'groovy'); ?> <svg><use xlink:href="#right-arrow"></use></svg></a>
<?php if( $loop_post_style == 'classic-image' ): ?>
<?php get_template_part('partials/meta-info'); ?>
<?php endif; ?>
<?php if( epcl_get_option('classic_display_author') !== '0' ): ?>
<?php get_template_part('partials/meta-info/author'); ?>
<?php endif; ?>
</div>
</footer>
</div>
<div class="clear"></div>
<div class="epcl-category-overlay"></div>
</article>