- <?php
- /**
- * The default template for displaying content
- *
- * Used for both single and index/archive/search.
- *
- * @package WordPress
- * @subpackage Twenty_Thirteen
- * @since Twenty Thirteen 1.0
- */
- ?>
- <?php if ( is_single() ) : ?>
- <div id="main_container" class="container clearfix">
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <div style="clear: both;"></div>
- <div class="block-left">
- <?php if(has_post_thumbnail()) :
- the_post_thumbnail( 'full' );
- else : ?>
- <img class="attachment-full wp-post-image" src="<?php bloginfo('template_url'); ?>/images/sample450.jpg" />
- <?php endif; ?><span class="watermark-logo"></span>
- <h2 class="single-post-external">
- <?php if(get_field( "nofollow_tag" )) { $nofollow_tag = 'rel="nofollow"'; }
- else { $nofollow_tag = ''; } ?>
- <?php echo $post_external_link = (get_post_meta(get_the_ID(),'post_external_link',true))?'<a href="'.get_post_meta(get_the_ID(),'post_external_link',true).'" '.$nofollow_tag.'>Click here to visit website</a>':'#'; ?>
- </h2>
- </div>
- <div class="block-right">
- <h2 class="single-post-title"><?php the_title(); ?></h2>
- <div class="mr-single-postrating"><?php if(function_exists("kk_star_ratings")) : echo kk_star_ratings(get_the_ID()); endif; ?></div>
- <div class="clearfix"></div>
- <h4 class="single-post-reveiws"><?php echo $post_external_link = (get_post_meta(get_the_ID(),'post_external_link',true))?'<a href="'.get_post_meta(get_the_ID(),'post_external_link',true).'" '.$nofollow_tag.'>'.get_post_meta(get_the_ID(),'post_external_link',true).'</a>':'#'; ?></h4>
- <div class="single-post-content"><?php the_content(); ?></div>
- <div class="likesNd-hates-out">
- <?php the_field("likes_hates_section"); ?>
- </div>
- </div>
- <div style="clear: both;"></div>
- </article><!-- #post -->
- </div>
- <?php else : ?>
- <?php if ( !is_search() ) : // Only display Excerpts for Search?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <div class="col-md-3 col-sm-3 col-xs-3">
- <?php
- $post_external_link = (get_post_meta(get_the_ID(),'post_external_link',true))?get_post_meta(get_the_ID(),'post_external_link',true):'#';
- $new_post_added = (get_post_meta(get_the_ID(),'new_post_added',true))?'<span class="new_txt">'.get_post_meta(get_the_ID(),'new_post_added',true).'</span>':'';
- ?>
- <div class="trip-box">
- <a title="<?php the_title(); ?>" target="_blank" href="<?php echo $post_external_link; ?>"><span class="li_list"><?php the_title(); ?></span><?php echo $new_post_added; ?></a>
- <a title="Click to visit <?php the_title(); ?>" href="<?php the_permalink(); ?>"><span class="review"></span></a>
- <a title="<?php the_title(); ?>" target="_blank" href="<?php echo $post_external_link; ?>">
- <?php /*?><img style="height:auto;width:100%;" class="lazyLoad" data-src="<?php bloginfo('template_url'); ?>/images/sample450.jpg" src="<?php bloginfo('template_url'); ?>/images/loading.gif" /><?php */?>
- <?php
- if(has_post_thumbnail())
- {
- $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );
- echo '<img class="attachment-full lazyLoad wp-post-image" data-src="'.$thumb[0].'" src="'.get_template_directory_uri().'/images/placeholder-img.png"/>';
- } else {
- echo '<img class="attachment-full lazyLoad wp-post-image" data-src="'.get_template_directory_uri().'/images/sample450.jpg" src="'.bloginfo('template_url').'/images/placeholder-img.png" />';
- }
- ?>
- </a>
- </div>
- </div>
- </article><!-- #post -->
- <?php endif; // is_search() ?>
- <?php endif; // is_single() ?>
- <?php if ( is_search() ) : // Only display Excerpts for Search ?>
- <div id="main_container" class="container clearfix">
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <div style="clear: both;">
- <div class="block-left-search">
- <?php if(has_post_thumbnail()) :
- the_post_thumbnail( 'full' );
- else : ?>
- <img class="attachment-full wp-post-image" src="<?php bloginfo('template_url'); ?>/images/sample450.jpg" />
- <?php endif; ?>
- </div>
- <div class="block-right-search">
- <h2 class="single-post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
- <p class="single-post-external">
- <?php echo $post_external_link = (get_post_meta(get_the_ID(),'post_external_link',true))?'<a href="'.get_post_meta(get_the_ID(),'post_external_link',true).'" '.$nofollow_tag.'>Click here to visit website</a>':'#'; ?>
- </p>
- <h4 class="single-post-reveiws">
- <?php if ( ! dynamic_sidebar( 'Review Widget' ) ) : ?>
- <?php endif ?>
- </h4>
- <div class="single-post-content"><?php the_excerpt(); ?></div>
- </div>
- </div>
- </article><!-- #post -->
- </div>
- <?php endif; ?>