<?php global $redux_builder_amp; ?>
<?php amp_header(); ?>
<?php if(ampforwp_get_setting('single-design-type') == '1'){?>
<div class="sp sgl">
	<?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
		<div class="cntr">
			<?php if ( true == $redux_builder_amp['ampforwp-bread-crumb'] ) {
				amp_breadcrumb();
			}?>
			<?php amp_categories_list();?>
			<?php amp_title(); ?>
			<?php if( true == $redux_builder_amp['enable-excerpt-single'] ){ ?>
				<div class="tl-exc">
				   <?php amp_excerpt(250); ?>
			    </div>
			<?php } ?>
		</div>
		<?php if ( ampforwp_get_setting('swift-featued-image') && ampforwp_has_post_thumbnail() ) { ?>
			<?php if ( ampforwp_get_setting('swift-featued-image-type') == 1) { ?>
			<div class="sf-img">
				<?php amp_featured_image();?>
			</div>
			<?php }	// Swift Featured Image Type 1
		}
	} ?>
	<div class="sp-cnt">
		<div class="cntr">
			<div class="sp-rl">
				<div class="sp-rt">
					<?php if (isset($redux_builder_amp['swift-social-position']) && 'above-content' == $redux_builder_amp['swift-social-position']){
							ampforwp_swift_social_icons(); 
						}
						if ( 'above-content' ==  ampforwp_get_setting('swift-add-this-position') ){
							echo ampforwp_addThis_support(); 
						}	?>
					<div class="cntn-wrp artl-cnt">
						<?php if ( ampforwp_get_setting('swift-featued-image') && ampforwp_has_post_thumbnail() ) { ?>
							<?php if ( ampforwp_get_setting('swift-featued-image-type') == 2) { ?>
								<div class="sf-img">
									<?php amp_featured_image();?>	
								</div>	
							<?php }	// Swift Featured Image Type 2
						} // Swift Featured Image ?>
						<?php amp_content(); ?>
					</div>
					<?php if (isset($redux_builder_amp['swift-social-position']) && 'below-content' == $redux_builder_amp['swift-social-position']){
						ampforwp_swift_social_icons(); 
						}
						if ( 'below-content' ==  ampforwp_get_setting('swift-add-this-position') ){
							echo ampforwp_addThis_support();
						} ?>
					<?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
					<?php 
 						$author_box = array();
						if( true == ampforwp_get_setting('amp-author-description') ) { ?>	
						<?php
						$author_box = array( 'avatar'=>true,
													'avatar_size'=>60,	
													'author_description'=>true,	
													'ads_below_the_author'=>true);
						if( true == ampforwp_get_setting('amp-author-bio-name')){
							$author_box['author_pub_name'] = true ;
						}
						amp_author_box( $author_box ); ?>	
					<?php } ?>
					<?php amp_post_navigation();?>
					<?php if ( true == ampforwp_get_setting('wordpress-comments-support') || true == ampforwp_get_setting('ampforwp-disqus-comments-support') || true == ampforwp_get_setting('ampforwp-facebook-comments-support') ||true == ampforwp_get_setting('ampforwp-vuukle-comments-support') ||true == ampforwp_get_setting('ampforwp-spotim-comments-support') ){ ?>
					<div class="cmts">
						<?php amp_comments();?>
					</div>
					<?php } ?>
						<?php do_action('ampforwp_post_after_design_elements'); ?>
					<?php } ?>
				</div>
				<?php if(!checkAMPforPageBuilderStatus(get_the_ID()) && (true == ampforwp_get_setting('enable-single-post-social-icons') || true == ampforwp_get_setting('amp-author-name') || true == ampforwp_get_setting('swift-date') || true == ampforwp_get_setting('ampforwp-single-related-posts-switch'))){ ?>
				<div class="sp-lt">
					<?php if (isset($redux_builder_amp['swift-social-position']) && 'default' == $redux_builder_amp['swift-social-position']){
						ampforwp_swift_social_icons(); 
						}
						if ( 'default' ==  ampforwp_get_setting('swift-add-this-position') ){
								echo ampforwp_addThis_support(); 
						} ?>
		              <?php if( true == ampforwp_get_setting('amp-author-name') ) { ?>
			            <div class="sp-athr">
			            	<span class="athr-tx"><?php echo ampforwp_translation($redux_builder_amp['amp-translator-published-by'], 'Published by' ); ?></span>
			            	<?php amp_author_box( 
										array('author_pub_name'=>true,'author_info'=>true)
										); ?>
			            </div>
			         <?php } ?>    
		            <?php if( true == $redux_builder_amp['ampforwp-tags-single'] && amp_tags_list()){ ?>
			            <div class="tags">
			            	<?php amp_tags_list();?>
			            </div>
		            <?php } 
		             if( true == ampforwp_get_setting('swift-date') ) { ?>
			            <div class="post-date">
			            	<?php amp_date(); ?><?php edit_post_link(); ?>
			            </div>

		            <?php }
		            if ( ampforwp_get_setting('rp_design_type') == '1' && true == ampforwp_get_setting('ampforwp-single-related-posts-switch')) {
					$my_query = ampforwp_related_post_loop_query();
				  	if( $my_query->have_posts() ) { $r_count = 1;?>
				  	<div class="srp">
			            <ul class="clearfix">
					        <?php ampforwp_related_post(); ?>
					        <?php
					          while( $my_query->have_posts() ) {
					            $my_query->the_post();
					        ?>
					        <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
					        	<?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { if(ampforwp_has_post_thumbnail()){?>
						            <div class="rlp-image">     
						                 <?php ampforwp_get_relatedpost_image('full',array('image_crop'=>'true','image_crop_width'=>220,'image_crop_height'=>134) );?>
									</div>
								<?php } } ?>	
								<div class="rlp-cnt">
									<?php 
									$show_excerpt_opt = ampforwp_get_setting('ampforwp-single-related-posts-excerpt');
									$argsdata = array(
											'show_author' => false,
											'show_excerpt' => $show_excerpt_opt
												);
									ampforwp_get_relatedpost_content($argsdata); ?> 
						        </div>
					        </li><?php
			            			do_action('ampforwp_between_related_post',$r_count);
                 							 $r_count++;
					        }
					      } ?>
	      				</ul>
	      			</div>
		            <?php wp_reset_postdata(); } ?>
				</div>
				<?php } ?>
		    </div>
		</div>
	</div>
<?php 
do_action("ampforwp_single_design_type_handle_d1"); 
	?>
<?php if( ampforwp_get_setting('single-design-type') == '1' && ampforwp_get_setting('rp_design_type') == '2'){
       if ( true == ampforwp_get_setting('ampforwp-single-related-posts-switch') && !checkAMPforPageBuilderStatus(get_the_ID()) ) {
		$my_query = ampforwp_related_post_loop_query();
	  	if( $my_query->have_posts() ) { $r_count = 1;?>
	  	<div class="srp">
	  		<div class="cntr">
	  		<?php ampforwp_related_post(); ?>
	            <ul class="clearfix">
			        <?php
			          while( $my_query->have_posts() ) {
			            $my_query->the_post();
			        ?>
			        <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
			        	<?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { if(ampforwp_has_post_thumbnail()){?>
				            <div class="rlp-image">     
				                 <?php ampforwp_get_relatedpost_image('full',array('image_crop'=>'true','image_crop_width'=>220,'image_crop_height'=>134) );?>
							</div>
						<?php } } ?>	
						<div class="rlp-cnt">
							<?php
							$show_excerpt_opt = ampforwp_get_setting('ampforwp-single-related-posts-excerpt');
							$argsdata = array(
									'show_author' =>  false,
									'show_excerpt' => $show_excerpt_opt
										);
							ampforwp_get_relatedpost_content($argsdata); ?> 
				        </div>
			        </li><?php
	            			do_action('ampforwp_between_related_post',$r_count);
	     							 $r_count++;
			        }
			      } ?>
				</ul>
			</div>
		</div>
    <?php wp_reset_postdata(); }  } ?>
<?php if( ampforwp_get_setting('single-design-type') == '1' && ampforwp_get_setting('rp_design_type') == '3'){
       if ( true == ampforwp_get_setting('ampforwp-single-related-posts-switch') && !checkAMPforPageBuilderStatus(get_the_ID()) ) {
		$my_query = ampforwp_related_post_loop_query();
	  	if( $my_query->have_posts() ) { $r_count = 1;?>
	  	<div class="srp">
	  		<div class="cntr">
	  		<?php ampforwp_related_post(); ?>
	            <amp-carousel height="310" layout="fixed-height" type="carousel">
			        <?php
			          while( $my_query->have_posts() ) {
			            $my_query->the_post();
			        ?>
			        <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
			        	<div class="rp-slide">
			        	<?php if ( true == ampforwp_get_setting('ampforwp-single-related-posts-image') ) { if(ampforwp_has_post_thumbnail()){?>
				            <div class="rlp-image">     
				                 <?php ampforwp_get_relatedpost_image('full',array('image_crop'=>'true','image_crop_width'=>346,'image_crop_height'=>188) );?>
							</div>
						<?php } } ?>	
							<div class="rlp-cnt">
								<?php 
								$show_excerpt_opt = ampforwp_get_setting('ampforwp-single-related-posts-excerpt');
								$argsdata = array(
										'show_author' => false,
										'read_more' => false,
										'show_excerpt' => $show_excerpt_opt
											);
								ampforwp_get_relatedpost_content($argsdata); ?> 
					        </div>
				    	</div>
			        </li><?php
	            			do_action('ampforwp_between_related_post',$r_count);
	     							 $r_count++;
			        }
			      } ?>
				</amp-carousel>
			</div>
		</div>
	<?php wp_reset_postdata(); }  } ?>	
<?php if($redux_builder_amp['single-design-type'] == '1' && isset($redux_builder_amp['ampforwp-swift-recent-posts']) && $redux_builder_amp['ampforwp-swift-recent-posts']=='1' && !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
	<div class="r-pf">
		<div class="cntr">
			<h3><?php echo esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-recent-text'], 'Recent Posts' )); ?></h3>
		<?php while( amp_loop('start', array( 'posts_per_page' => 6 ) ) ): ?>
			<div class="fsp">
				<?php if( ampforwp_has_post_thumbnail() ){
					$width 	= 346;
					$height = 188;
					if( true == $redux_builder_amp['ampforwp-homepage-posts-image-modify-size'] ){
						$width 	= $redux_builder_amp['ampforwp-swift-homepage-posts-width'];
						$height = $redux_builder_amp['ampforwp-swift-homepage-posts-height'];
					}
					$args = array("tag"=>'div',"tag_class"=>'image-container','image_size'=>'full','image_crop'=>'true','image_crop_width'=>$width,'image_crop_height'=>$height, 'responsive'=> true); ?>
				    <div class="fsp-img">
				    	<?php amp_loop_image($args); ?>
				    </div>
			    <?php } ?>
			    <div class="fsp-cnt">
			    	<?php amp_loop_category(); ?>
				    <?php amp_loop_title(); ?>
				    <?php amp_loop_excerpt(20); ?>
				<?php if( true == ampforwp_get_setting('amforwp-recentpost-date-switch')){?>
					    <div class="pt-dt">
					    	<?php amp_loop_date(); ?>
					    </div>
				<?php }?>
			    </div>
			</div>
		<?php endwhile; amp_loop('end');  ?>
		</div>
	</div>
<?php } // Recent Posts End Here ?>
</div>
<?php } // Single Design 1 ends here  ?>
<?php if($redux_builder_amp['single-design-type'] == '4'){ ?>
<div class="sp sgl">
	<div class="cntr">
		<div class="sp-wrap">
			<div class="sp-artl">
				<div class="sp-left">
					<?php if( !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
						<?php if ( true == $redux_builder_amp['ampforwp-bread-crumb'] ) {
							amp_breadcrumb();
						}?>
						<?php amp_categories_list();?>
						<?php amp_title(); ?>
						<?php if( true == $redux_builder_amp['enable-excerpt-single'] ){ ?>
							<div class="tl-exc">
							   <?php amp_excerpt(20); ?>
						    </div>
						<?php } ?>
						<?php if ( ampforwp_get_setting('swift-featued-image') && ampforwp_has_post_thumbnail() ) { ?>
							<div class="sf-img">
								<?php amp_featured_image();?>
							</div>
						<?php }
					}?>
					<div class="sp-cnt">
						<div class="sp-rl">
							<div class="sp-rt">
								<div class="cntn-wrp artl-cnt">
									<?php 
									if ( 'above-content' ==  ampforwp_get_setting('swift-layout-addthis-pos') ){
										echo ampforwp_addThis_support(); 
									} ?>
									<?php amp_content(); 
									if ( 'below-content' ==  ampforwp_get_setting('swift-layout-addthis-pos') ){
											echo ampforwp_addThis_support();
									}	?>
								</div>
								<?php if( !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
								<div class="ss-ic">
									<span class="shr-txt"><?php echo esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-share-text'], 'Share' )); ?></span>
									<ul>
										<?php if($redux_builder_amp['enable-single-facebook-share']){?>
										<li>
											<a class="s_fb" target="_blank" href="https://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>"></a>
										</li>
										<?php } ?>
										<?php 
										$data_param = '';
										if(ampforwp_get_setting('enable-single-twitter-share')){
											$data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
											$data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.''; ?>
										<li>
											<a class="s_tw" target="_blank" href="https://twitter.com/intent/tweet?url=<?php the_permalink(); ?>&text=<?php echo esc_attr(ampforwp_sanitize_twitter_title(get_the_title())); ?><?php echo esc_attr($data_param); ?>">
											</a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-gplus-share']){?>
										<li>
											<a class="s_gp" target="_blank" href="https://plus.google.com/share?url=<?php the_permalink(); ?>"></a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-email-share']){?>
										<li>
											<a class="s_em" target="_blank" href="mailto:?subject=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&body=<?php the_permalink(); ?>"></a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-pinterest-share']){
											$image = '';
											if (ampforwp_has_post_thumbnail( ) ){
				 								$image = ampforwp_get_post_thumbnail( 'url', 'full' );
				 							}?>
										<li>
											<a class="s_pt" target="_blank" href="https://pinterest.com/pin/create/button/?media=<?php echo esc_url($image); ?>&url=<?php esc_url(the_permalink()); ?>&description=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-linkedin-share']){?>
										<li>
											<a class="s_lk" target="_blank" href="https://www.linkedin.com/shareArticle?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-whatsapp-share']){?>
										<li>
											<a class="s_wp" target="_blank" href="https://api.whatsapp.com/send?text=<?php the_permalink(); ?>" data-action="share/whatsapp/share"></a>
										</li>
										<?php } ?>
										<?php if(ampforwp_get_setting('enable-single-line-share') == true)  {
										$line_share = 'http://line.me/R/msg/text/';
										$amp_permalink = get_the_permalink();
										$amp_permalink = add_query_arg($amp_permalink,'', $line_share );	
										?>
			<li>
			<a title="line share" class="s_li" href="http://line.me/R/msg/text/?<?php echo esc_url($amp_permalink); ?>">
					<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0M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jcyMS00LjgzOCw2LjY1OCAgIGMtMC43MTIsMC4yMzEtMS40NDEsMC4zNDMtMi4xNjEsMC4zNDNjLTIuMTk5LDAtNC4zMjMtMS4wMzktNS42NjYtMi44ODhsLTI1LjIwNy0zNC43MTd2MzAuNjA1YzAsMy44NjYtMy4xMzQsNy03LDcgICBjLTMuODY2LDAtNy0zLjEzNC03LTd2LTUyLjE2YzAtMy4wMzMsMS45NTMtNS43MjEsNC44MzgtNi42NThjMi44ODYtMC45MzYsNi4wNDUsMC4wOSw3LjgyNywyLjU0NWwyNS4yMDcsMzQuNzE3Vjk5LjY3NSAgIGMwLTMuODY2LDMuMTM0LTcsNy03YzMuODY2LDAsNywzLjEzNCw3LDdWMTUzLjM3MXogTTIzMy4zMTEsMTU5LjI2OWgtMzQuNjQ1Yy0zLjg2NiwwLTctMy4xMzQtNy03di0yNi44NDdWOTguNTczICAgYzAtMy44NjYsMy4xMzQtNyw3LTdoMzMuNTdjMy44NjYsMCw3LDMuMTM0LDcsN3MtMy4xMzQsNy03LDdoLTI2LjU3djEyLjg0OWgyMS41NjJjMy44NjYsMCw3LDMuMTM0LDcsN2MwLDMuODY2LTMuMTM0LDctNyw3ICAgaC0yMS41NjJ2MTIuODQ3aDI3LjY0NWMzLjg2NiwwLDcsMy4xMzQsNyw3UzIzNy4xNzcsMTU5LjI2OSwyMzMuMzExLDE1OS4yNjl6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="15" height="15" />

			</a>
		</li>
		<?php } ?>
										<?php if($redux_builder_amp['enable-single-vk-share']){?>
										<li>
											<a class="s_vk" target="_blank" href="http://vk.com/share.php?url=<?php the_permalink(); ?>"></a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-odnoklassniki-share']){?>
										<li>
											<a class="s_od" target="_blank" href="https://ok.ru/dk?st.cmd=addShare&st._surl=<?php the_permalink(); ?>"></a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-reddit-share']){?>
										<li>
											<a class="s_rd" target="_blank" href="https://reddit.com/submit?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-tumblr-share']){?>
										<li>
											<a class="s_tb" target="_blank" href="https://www.tumblr.com/widgets/share/tool?canonicalUrl=<?php the_permalink(); ?>"></a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-telegram-share']){?>
										<li>
											<a class="s_tg" target="_blank" href="https://telegram.me/share/url?url=<?php the_permalink(); ?>&text=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-digg-share']){?>
										<li>
											<a class="s_dg" target="_blank" href="http://digg.com/submit?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-stumbleupon-share']){?>
										<li>
											<a class="s_su" target="_blank" href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-wechat-share']){?>
										<li>
											<a class="s_wc" target="_blank" href="http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url=<?php the_permalink(); ?>"></a>
										</li>
										<?php } ?>
										<?php if($redux_builder_amp['enable-single-viber-share']){?>
										<li>
											<a class="s_vb" target="_blank" href="viber://forward?text=<?php the_permalink(); ?>"></a>
										</li>
										<?php } ?>
										<?php if ( isset($redux_builder_amp['enable-single-hatena-bookmarks']) && $redux_builder_amp['enable-single-hatena-bookmarks']){?>
							<li>
								<a class="s_hb" target="_blank" href="http://b.hatena.ne.jp/entry/<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
							</li>
							<?php } ?>
							<?php if ( isset($redux_builder_amp['enable-single-pocket-share']) && $redux_builder_amp['enable-single-pocket-share']){?>
							<li>
								<a class="s_pk" target="_blank" href="https://getpocket.com/save?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
							</li>
							<?php } ?>
										<?php if ( isset($redux_builder_amp['enable-single-yummly-share']) && $redux_builder_amp['enable-single-yummly-share']){?>
										<li>
											<a class="s_ym" target="_blank" href="http://www.yummly.com/urb/verify?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&yumtype=button"></a>
										</li>
										<?php } ?>
										<?php if(ampforwp_get_setting('ampforwp-facebook-like-button')){?>
										<li>
											<amp-facebook-like width=90 height=28
							 					layout="fixed"
							 					data-size="large"
							    				data-layout="button_count"
							    				data-href="<?php echo esc_url(get_the_permalink());?>">
											</amp-facebook-like>
										</li>
										<?php } ?>

									</ul>
					            </div>
					            <?php if( true == $redux_builder_amp['ampforwp-tags-single'] && amp_tags_list()){ ?>
						            <div class="tags">
						            	<?php amp_tags_list();?>
						            </div>
					            <?php } 
					             if( true == ampforwp_get_setting('swift-date') ) { ?>
						            <div class="post-date">
						            	<?php amp_date(); ?><?php edit_post_link(); ?>
						            </div>
					            <?php }
					             $author_box = array();
					              if( true == ampforwp_get_setting('amp-author-description') ) { ?>
									<?php
									$author_box = array( 'avatar'=>true,
													'avatar_size'=>60,	
													'author_description'=>true,	
													'ads_below_the_author'=>true);
								if( true == ampforwp_get_setting('amp-author-bio-name')){
									$author_box['author_pub_name'] = true;
								}
								amp_author_box( $author_box );?>
								<?php } ?>
								<?php amp_post_navigation();?>
								<div class="cmts">
									<?php amp_comments();?>
									<?php do_action('ampforwp_post_after_design_elements'); ?>
								</div>
					            <?php
					            if ( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_builder_amp['ampforwp-single-related-posts-switch'] ) {
								$my_query = ampforwp_related_post_loop_query();
							  	if( $my_query->have_posts() ) { $r_count = 1;?>
							  	<div class="srp">
							  		<?php ampforwp_related_post(); ?>
						            <ul class="clearfix">
								        <?php
								          while( $my_query->have_posts() ) {
								            $my_query->the_post();
								        ?>
								        <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
								        	<?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { ?>
									            <div class="rlp-image">     
									                 <?php ampforwp_get_relatedpost_image('full',array('image_crop'=>'true','image_crop_width'=>220,'image_crop_height'=>134) );?>
												</div>
											<?php } ?>	
											<div class="rlp-cnt">
												<?php 
												$show_excerpt_opt = $redux_builder_amp['ampforwp-single-related-posts-excerpt'];

												$argsdata = array(
														'show_author' => false,
														'show_excerpt' => $show_excerpt_opt
															);
												ampforwp_get_relatedpost_content($argsdata); ?> 
									        </div>
								        </li><?php
						            			do_action('ampforwp_between_related_post',$r_count);
			                 							 $r_count++;
								        }
								       ?>
				      				</ul>
				      			</div>
					            <?php }
					            wp_reset_postdata(); } 
					        	} ?>
							</div><!-- /.sp-rt -->
					    </div><!-- /.sp-rl -->
					</div><!-- /.sp-cntn -->
					<?php if( $redux_builder_amp['single-design-type'] == '4' && isset($redux_builder_amp['ampforwp-swift-recent-posts']) && $redux_builder_amp['ampforwp-swift-recent-posts']=='1' && !checkAMPforPageBuilderStatus(get_the_ID()) ) {?>
					<div class="r-pf">
						<h3><?php echo ampforwp_translation($redux_builder_amp['amp-translator-recent-text'], 'Recent Posts' ); ?></h3>
						<?php while( amp_loop('start', array( 'posts_per_page' => 6 ) ) ): ?>
							<div class="fsp">
								<?php
								if(ampforwp_has_post_thumbnail()){
									$width 	= 346;
									$height = 188;
									if( true == $redux_builder_amp['ampforwp-homepage-posts-image-modify-size'] ){
										$width 	= $redux_builder_amp['ampforwp-swift-homepage-posts-width'];
										$height = $redux_builder_amp['ampforwp-swift-homepage-posts-height'];
									} 
									$args = array("tag"=>'div',"tag_class"=>'image-container','image_size'=>'full','image_crop'=>'true','image_crop_width'=>$width,'image_crop_height'=>$height, 'responsive'=> true); ?>
								    <div class="fsp-img">
								    	<?php amp_loop_image($args); ?>
								    </div>
							    <?php } ?>
							    <div class="fsp-cnt">
							    	<?php amp_loop_category(); ?>
								    <?php amp_loop_title(); ?>
								    <?php amp_loop_excerpt(20); ?>
				<?php if( true == ampforwp_get_setting('amforwp-recentpost-date-switch')){?>
							    <div class="pt-dt">
							    	<?php amp_loop_date(); ?>
							    </div>
				<?php }?>
							    </div>
							</div>
						<?php endwhile; amp_loop('end');  ?>
					</div>
					<?php } ?>
				</div><!-- /.sp-left -->
				<?php if( $redux_builder_amp['swift-sidebar'] == '1' && !checkAMPforPageBuilderStatus(get_the_ID()) ){ ?>
				<?php if ( is_active_sidebar( 'swift-sidebar' ) ) : ?>
				<div class="sdbr-right">
					<?php 
						$sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
						if ( $sanitized_sidebar) {
							$sidebar_output = $sanitized_sidebar->get_amp_content();
							$sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
						}
			            echo do_shortcode($sidebar_output); // amphtml content, no kses
					?>
				</div>
			<?php endif; ?>
				<?php } ?>
			</div><!-- /.sp-artl -->
		</div><!-- /.sp-wrap -->
	</div><!-- /.container -->
</div>
<?php }// New single desing Ends?>
<?php do_action("ampforwp_single_design_type_handle"); ?>
	<?php amp_footer()?>