• File: content-version1.php
  • Full Path: /home/chassiw/www/wp-content/themes/reon/content/content-version1.php
  • File size: 3.56 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php
	$show_title = get_theme_mod( 'show_title');
	$show_date = get_theme_mod( 'show_date');
	$show_excerpt = get_theme_mod( 'show_excerpt');
	$show_readmore = get_theme_mod( 'show_readmore');
?>
<div class="blog-reon-grid blog-reon-grid-v1">
	<div class="row">
	<?php if ( have_posts() ) : while( have_posts() ) : the_post()  ?>
		<?php $sticky_class = is_sticky()?'sticky':''; ?>
		<?php if( has_post_format('link') ){ ?>
		
			<article id="post-<?php the_ID(); ?>" <?php post_class('post-wrap '. $sticky_class); ?>  >
				
					<?php
					        $link = get_post_meta( $post->ID, 'format_link_url', true );
					        $link_description = get_post_meta( $post->ID, 'format_link_description', true );
					        
					        if ( is_single() ) {
					                printf( '<h1 class="entry-title"><a href="%1$s" target="blank">%2$s</a></h1>',
					                        $link,
					                        get_the_title()
					                );
					        } else {
					                printf( '<h2 class="entry-title"><a href="%1$s" target="blank">%2$s</a></h2>',
					                        $link,
					                        get_the_title()
					                );
					        }
					?>
					<?php
					        printf( '<a href="%1$s" target="blank">%2$s</a>',
					                $link,
					                $link_description
					        );
					?>
			</article>

		<?php }elseif ( has_post_format('aside') ){ ?>

			<article id="post-<?php the_ID(); ?>" <?php post_class('post-wrap '. $sticky_class); ?>  >
					<div class="post-body">
				           <?php the_content(''); /* Display content  */ ?>
				    </div>
			</article>

		<?php }else{ ?>
		<div class="col-xl-4 col-lg-4 col-md-4 col-sm-6 col-12">
			<article id="post-<?php the_ID(); ?>" <?php post_class('post-wrap '. $sticky_class); ?>  >
					
					<?php if( has_post_format('audio') ){ ?>

						 <div class="post-media">
				        	<?php reon_postformat_audio(); /* Display video of post */ ?>
				        </div>

					<?php }elseif(has_post_format('gallery')){ ?>

						<?php reon_content_gallery(); /* Display gallery of post */ ?>

					<?php }elseif(has_post_format('video')){ ?>

						 <div class="post-media">
				        	<?php reon_postformat_video(); /* Display video of post */ ?>
				        </div>

					<?php }elseif(has_post_thumbnail()){ ?>

				        <div class="post-media">
				        	<a href="">
					        	<?php reon_content_thumbnail('full'); /* Display thumbnail of post */ ?>
					        	<div class="overlay"></div>
								<i class="zmdi zmdi-plus"></i>
							</a>
				        </div>

			        <?php } ?>


				
				<div class="blog-detail">
					<?php if ($show_title !== 'no') : ?>
				        <div class="post-title">
				            <?php reon_content_title(); /* Display title of post */ ?>
					    </div>
					<?php endif ?>
					<?php if ($show_date !== 'no') : ?>
				        <div class="date-cmt">
							<?php reon_content_meta_new() ?>
						</div>
					<?php endif ?>
					<?php if ($show_excerpt !== 'no') : ?>
					    <div class="post-body">
					    	<div class="post-excerpt">
					           <p><?php echo reon_custom_text(get_the_excerpt(), 10) ?></p>
					        </div>
					    </div>
				    <?php endif ?>
					
				    <?php if(is_single()){ ?>
				    <?php reon_content_tag(); /* Display tags, category */ ?>
				    <?php } ?>
				</div>
			</article>

		</div>
		<?php } ?>
	<?php endwhile; ?>
	<div class="pagination-wrapper">
	    <?php reon_pagination_theme(); ?>
	</div>
	<?php else : ?>
	    <?php get_template_part( 'content/content', 'none' ); ?>
	<?php endif; ?>
	</div>
</div>