File: /home/slyfwmm/cortonavolley/wp-content/themes/subway/blog_single-loop.php
<?php
$_post_format = get_post_format();
?>
<?php
switch ($_post_format) {
case "video":
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="post_image">
<?php $_video_type = get_post_meta(get_the_ID(), "video_format_choose", true);?>
<?php if(get_post_meta(get_the_ID(), "video_height", true) != "") {
$video_height = get_post_meta(get_the_ID(), "video_height", true);
} else {
$video_height = 540;
} ?>
<?php if($_video_type == "youtube") { ?>
<iframe height="<?php echo esc_attr( $video_height ); ?>" src="https://www.youtube.com/embed/<?php echo get_post_meta(get_the_ID(), "video_format_link", true); ?>?wmode=transparent" wmode="Opaque" frameborder="0" allowfullscreen></iframe>
<?php } elseif ($_video_type == "vimeo"){ ?>
<iframe height="<?php echo esc_attr( $video_height ); ?>" src="https://player.vimeo.com/video/<?php echo get_post_meta(get_the_ID(), "video_format_link", true); ?>?title=0&byline=0&portrait=0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<?php } ?>
</div>
<div class="post_text">
<div class="post_description">
<span class="post_infos">
<span class="date"><?php the_time('d'); ?></span> <span class="month"><?php the_time('F'); ?></span>
<?php esc_html_e('In','subway'); ?> <?php the_category(', '); ?>
<?php esc_html_e('by','subway'); ?> <a class="post_author" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta('display_name'); ?></a>
<?php if( has_tag()) { ?><?php the_tags(esc_html__('Tags: ','subway')); ?><?php } ?>
</span>
</div>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
</div>
</article>
<?php
break;
case "audio":
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="post_image">
<audio src="<?php echo get_post_meta(get_the_ID(), "audio_link", true) ?>" controls="controls">
<?php esc_html_e("Your browser don't support audio player",'subway'); ?>
</audio>
</div>
<div class="post_text">
<div class="post_description">
<span class="post_infos">
<span class="date"><?php the_time('d'); ?></span> <span class="month"><?php the_time('F'); ?></span>
<?php esc_html_e('In','subway'); ?> <?php the_category(', '); ?>
<?php esc_html_e('by','subway'); ?> <a class="post_author" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta('display_name'); ?></a>
<?php if( has_tag()) { ?><?php the_tags(esc_html__('Tags: ','subway')); ?><?php } ?>
</span>
</div>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
</div>
<?php
break;
case "link":
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="post_text">
<div class="post_text_holder">
<div class="post_description">
<span class="post_infos">
<span class="date"><?php the_time('d'); ?></span> <span class="month"><?php the_time('F'); ?></span>
<?php esc_html_e('In','subway'); ?> <?php the_category(', '); ?>
<?php esc_html_e('by','subway'); ?> <a class="post_author" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta('display_name'); ?></a>
<?php if( has_tag()) { ?><?php the_tags(esc_html__('Tags: ','subway')); ?><?php } ?>
</span>
</div>
<i class="link_mark icon-link pull-left"></i>
<div class="post_title">
<h3><a href="<?php echo get_post_meta(get_the_ID(), "title_link", true); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
</div>
</div>
<?php the_content(); ?>
</div>
<?php
break;
case "gallery":
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="post_image">
<div class="flexslider">
<ul class="slides">
<?php
$post_content = get_the_content();
preg_match('/\[gallery.*ids=.(.*).\]/', $post_content, $ids);
$array_id = explode(",", $ids[1]);
foreach($array_id as $img_id){ ?>
<li><a href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $img_id, 'full' ); ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="post_text">
<div class="post_description">
<span class="post_infos">
<span class="date"><?php the_time('d'); ?></span> <span class="month"><?php the_time('F'); ?></span>
<?php esc_html_e('In','subway'); ?> <?php the_category(', '); ?>
<?php esc_html_e('by','subway'); ?> <a class="post_author" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta('display_name'); ?></a>
<?php if( has_tag()) { ?><?php the_tags(esc_html__('Tags: ','subway')); ?><?php } ?>
</span>
</div>
<h2><?php the_title(); ?></a></h2>
<?php
$content = str_replace($ids[0], "", $post_content);
echo do_shortcode($content);
?>
</div>
<?php
break;
case "quote":
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="post_text">
<div class="post_text_holder">
<div class="post_description">
<span class="post_infos">
<span class="date"><?php the_time('d'); ?></span> <span class="month"><?php the_time('F'); ?></span>
<?php esc_html_e('In','subway'); ?> <?php the_category(', '); ?>
<?php esc_html_e('by','subway'); ?> <a class="post_author" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta('display_name'); ?></a>
<?php if( has_tag()) { ?><?php the_tags(esc_html__('Tags: ','subway')); ?><?php } ?>
</span>
</div>
<i class="qoute_mark icon-quote-right pull-left"></i>
<div class="post_title">
<h3><?php echo get_post_meta(get_the_ID(), "quote_format", true); ?></h3>
<span class="quote_author">— <?php the_title(); ?></span>
</div>
</div>
<?php the_content(); ?>
</div>
<?php
break;
default:
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if(get_post_meta(get_the_ID(), "qode_hide-featured-image", true) != "yes") {
if ( has_post_thumbnail() ) { ?>
<div class="post_image">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail('full'); ?>
</a>
</div>
<?php } } ?>
<div class="post_text">
<div class="post_description">
<span class="post_infos">
<span class="date"><?php the_time('d'); ?></span> <span class="month"><?php the_time('F'); ?></span>
<?php esc_html_e('In','subway'); ?> <?php the_category(', '); ?>
<?php esc_html_e('by','subway'); ?> <a class="post_author" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta('display_name'); ?></a>
<?php if( has_tag()) { ?><?php the_tags(esc_html__('Tags: ','subway')); ?><?php } ?>
</span>
</div>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
</div>
<?php
}
?>
<?php subway_qode_wp_link_pages(); ?>
<?php if( subway_qode_is_author_enabled() && get_the_author_meta( 'description' ) != "" ) { ?>
<div class="author_description">
<div class="author_description_inner">
<div class="image">
<?php echo get_avatar(get_the_author_meta( 'ID' ), 80); ?>
</div>
<div class="author_text_holder">
<h4 class="author_name"><?php esc_html_e('AUTHOR','subway') ?> -
<?php
if(get_the_author_meta('first_name') != "" || get_the_author_meta('last_name') != "") {
echo get_the_author_meta('first_name') . " " . get_the_author_meta('last_name');
} else {
echo get_the_author_meta('display_name');
}
?>
</h4>
<?php if(get_the_author_meta('description') != "") { ?>
<div class="author_text">
<p><?php echo get_the_author_meta('description') ?></p>
</div>
<?php } ?>
</div>
</div>
</div>
<?php } ?>
</article>
<div class="blog_social_and_comments">
<?php if( subway_qode_is_comments_enabled() ){ ?>
<div class="comment_number_holder">
<p><?php comments_number( esc_html__('No Comment','subway'), '1 '.esc_html__('Comment','subway'), '% '.esc_html__('Comments','subway') ); ?></p>
</div>
<?php } ?>
<div class="blog_single_social">
<?php if( subway_qode_is_like_enabled() ) { ?>
<span class="blog_like">
<?php if(function_exists('subway_core_like')) { subway_core_like(); } ?>
</span>
<?php } ?>
<?php if ( subway_qode_is_core_installed() ) {
echo do_shortcode('[social_share]');
} ?>
</div>
</div>