253 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			253 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * Blog Post Main File.
 | |
|  *
 | |
|  * @package THINKAI
 | |
|  * @author  Template Path
 | |
|  * @version 1.0
 | |
|  */
 | |
| 
 | |
| get_header();
 | |
| $options = thinkai_WSH()->option();
 | |
| 
 | |
| $data    = \THINKAI\Includes\Classes\Common::instance()->data( 'single' )->get();
 | |
| $layout = $data->get( 'layout' );
 | |
| $sidebar = $data->get( 'sidebar' );
 | |
| 
 | |
| $layout = ( $layout ) ? $layout : 'full';
 | |
| $sidebar = ( $sidebar ) ? $sidebar : '';
 | |
| if (is_active_sidebar( $sidebar )) {$layout = 'right';} else{$layout = 'full';}
 | |
| $class = ( !$layout || $layout == 'full' ) ? 'col-xl-12 col-lg-12 col-md-12' : 'col-xl-8 col-lg-8 col-md-12';
 | |
| 
 | |
| if ( class_exists( '\Elementor\Plugin' ) && $data->get( 'tpl-type' ) == 'e') {
 | |
| 	
 | |
| 	while(have_posts()) {
 | |
| 	   the_post();
 | |
| 	   the_content();
 | |
|     }
 | |
| 
 | |
| } else {
 | |
| ?>
 | |
| 
 | |
| <?php if ( $data->get( 'enable_banner' ) ) : ?>
 | |
| 	<?php do_action( 'thinkai_banner', $data );?>
 | |
| <?php else:?>
 | |
| <!--Start breadcrumb Style1-->
 | |
| <section class="breadcrumb-style1 <?php if( $data->get( 'banner' ) ) echo 'm-t130'?>">
 | |
| 	<?php if( $data->get( 'banner' ) ){?>
 | |
|         <div id="particles-js"></div>
 | |
|         <div class="breadcrumb-style1-bg" style="background-image: url(<?php echo esc_url( $data->get( 'banner' ) ); ?>);"></div>
 | |
|     <?php } ?>
 | |
|     
 | |
|     <!--Start Scrolling Text Style6-->
 | |
|     <?php 
 | |
|         $features_list = $data->get('features_list');
 | |
|         if(!empty($features_list)){
 | |
|         $features_list = explode("\n", ($features_list)); 
 | |
|     ?>        
 | |
|     <div class="scrolling-text-style6">
 | |
|         <div class="inner">
 | |
|             <ul class="clearfix marquee_mode">
 | |
|                 <?php foreach($features_list as $features): ?>
 | |
|                 <li data-hover="<?php echo wp_kses($features, true); ?>">
 | |
|                     <?php echo wp_kses($features, true); ?>
 | |
|                 </li>
 | |
|                 <?php endforeach; ?>
 | |
|             </ul>
 | |
|         </div>
 | |
|     </div>
 | |
|     <?php } ?>
 | |
|     
 | |
|     <!--End Scrolling Text Style6-->
 | |
|     <div class="container">
 | |
|         <div class="inner-content">
 | |
|             <div class="title text-center">
 | |
|                 <h2><?php if( $data->get( 'title' ) ) echo wp_kses( $data->get( 'title' ), true ); else( the_title() ); ?></h2>
 | |
|             </div>
 | |
|         </div>
 | |
|     </div>
 | |
| </section>
 | |
| <!--End breadcrumb Style1-->
 | |
| <?php endif;?>
 | |
| 
 | |
| 
 | |
| <!--Start Blog Details-->
 | |
| <section class="boog-details">
 | |
|     <div class="container">
 | |
|         <div class="row">
 | |
|         	<?php
 | |
| 				if ( $data->get( 'layout' ) == 'left' ) {
 | |
| 					do_action( 'thinkai_sidebar', $data );
 | |
| 				}
 | |
| 			?>
 | |
|             <div class="content-side <?php echo esc_attr( $class ); ?>">
 | |
|             	
 | |
| 				<?php while ( have_posts() ) : the_post(); ?>				
 | |
|                 <div class="boog-details__content">             	
 | |
|                     <div class="thm-unit-test"> 
 | |
|                     	
 | |
|                         <!--Start Blog Post Info-->
 | |
|                         <div class="blog-post-info">
 | |
|                             <div class="blog-post-info-inner">
 | |
|                                 <div class="blog-post-info__author">
 | |
|                                     <?php if( $options->get( 'single_post_author' ) != true ){ ?>
 | |
|                                     <h5><?php the_author(); ?></h5>
 | |
|                                     <?php } ?>
 | |
|                                     
 | |
|                                     <?php if( ($options->get( 'single_post_date' ) || $options->get( 'single_post_comments' )) != true ){ ?>
 | |
|                                     <ul>
 | |
|                                         <?php if( $options->get( 'single_post_date' ) != true ){ ?><li><a href="<?php echo get_month_link(get_the_date('Y'), get_the_date('m')); ?>"><?php echo get_the_date(); ?></a></li><?php } ?>
 | |
|                                         <?php if( $options->get( 'single_post_comments' ) != true ){ ?>
 | |
|                                         <li class="dotted"></li>
 | |
|                                         <li><a href="<?php echo esc_url(get_permalink(get_the_id()).'#comments'); ?>"><?php comments_number( wp_kses(__('0 Comments' , 'thinkai'), true), wp_kses(__('01 Comment' , 'thinkai'), true), wp_kses(__('0% Comments' , 'thinkai'), true)); ?></a></li>
 | |
|                                         <?php } ?>
 | |
|                                     </ul>
 | |
|                                     <?php } ?>
 | |
|                                     
 | |
|                                 </div>
 | |
|                                 
 | |
| 								<?php if(function_exists('bunch_share_us_two')){ ?>
 | |
|                                 <div class="blog-post-social-share">
 | |
|                                     <span class="icon-share"></span>
 | |
|                                 	<?php echo (bunch_share_us_two(get_the_id(), $post->post_name)); ?>
 | |
|                                	</div>
 | |
|                                 <?php } ?>
 | |
|                                 
 | |
|                             </div>
 | |
|                             
 | |
| 							<?php if(has_category() || $options->get( 'single_post_category' )){ ?>
 | |
|                             <div class="blog-post-info-category">
 | |
|                                 <?php the_category(' '); ?>
 | |
|                             </div>
 | |
|                             <?php } ?>
 | |
|                         </div>
 | |
|                         <!--End Blog Post Info-->
 | |
| 						
 | |
| 						<?php if(has_post_thumbnail()){ ?>
 | |
|                         <!--Start Blog Details Img Box-->
 | |
|                         <div class="blog-details__img-box">
 | |
|                             <?php the_post_thumbnail('full'); ?>
 | |
|                         </div>
 | |
|                         <!--End Blog Details Img Box-->
 | |
| 						<?php } ?>
 | |
|                         
 | |
|                         <div class="text"><?php the_content(); ?></div>
 | |
|                         <div class="clearfix"></div>
 | |
|                         <?php wp_link_pages(array('before'=>'<div class="paginate-links m-t30">'.esc_html__('Pages: ', 'thinkai'), 'after' => '</div>', 'link_before'=>'<span>', 'link_after'=>'</span>')); ?>
 | |
| 
 | |
|                         
 | |
|                         <?php if(has_tag()){ ?>
 | |
|                         <!--Start Blog Details Tag Box-->
 | |
|                         <div class="blog-details-tag-box">
 | |
|                             <div class="inner-title">
 | |
|                                 <h3><span class="icon-price-tag"></span><?php esc_html_e('Post Tags','thinkai'); ?></h3>
 | |
|                             </div>
 | |
|                             <ul>
 | |
|                                 <?php the_tags( '<li>', '</li><li>', '</li>' ); ?>
 | |
|                             </ul>
 | |
|                         </div>
 | |
|                         <!--End Blog Details Tag Box-->
 | |
|                         <?php } ?>
 | |
| 
 | |
|                         
 | |
|                         <?php if( $options->get( 'single_post_author_box' ) ):?>
 | |
|                         <!--Start Blog Details Author Box-->
 | |
|                         <div class="blog-details-author-box clearfix">
 | |
|                             <div class="blog-details-author">
 | |
|                                 <div class="img-box">
 | |
|                                     <?php echo get_avatar(get_the_author_meta('ID'), 150); ?>
 | |
|                                 </div>
 | |
|                                 <div class="text-box">
 | |
|                                     <div class="text-box__top">
 | |
|                                         <div class="left">
 | |
|                                             <h5><?php esc_html_e('Post By','thinkai'); ?></h5>
 | |
|                                             <h3><?php the_author(); ?></h3>
 | |
|                                         </div>
 | |
|                                         
 | |
|                                         <?php 
 | |
| 											if($options->get('show_author_post_social_icon')){ 
 | |
| 										?>
 | |
|                                         <div class="right">
 | |
|                                             <div class="social-links">
 | |
|                                                 <ul>
 | |
|                                                     <?php echo (thinkai_get_social_icon()); ?>
 | |
|                                                 </ul>
 | |
|                                             </div>
 | |
|                                         </div>
 | |
|                                         <?php } ?>
 | |
|                                     </div>
 | |
|                                     <div class="text-box__bottom">
 | |
|                                         <p><?php the_author_meta( 'description', get_the_author_meta('ID') ); ?></p>
 | |
|                                     </div>
 | |
|                                 </div>
 | |
|                             </div>
 | |
|                         </div>
 | |
|                         <!--End Blog Details Author Box-->
 | |
| 						<?php endif; ?>
 | |
|                         
 | |
|                         <?php if((get_previous_post()) || (get_next_post())): ?>
 | |
|                         <!--Start Blog Prev Next Option-->
 | |
|                         <div class="blog-prev-next-option">
 | |
|                             <?php global 
 | |
| 								$post; $prev_post = get_previous_post();
 | |
| 								if (!empty($prev_post)):
 | |
| 							?>
 | |
|                             <div class="single-box left">
 | |
|                                 <div class="title-box">
 | |
|                                     <div class="button-box">
 | |
|                                         <a href="<?php echo esc_url(get_permalink($prev_post->ID)); ?>"><span class="icon-left-arrow1"></span> <?php esc_html_e('Prev Post', 'thinkai'); ?></a>
 | |
|                                     </div>
 | |
|                                     <h3>
 | |
|                                         <a href="<?php echo esc_url(get_permalink($prev_post->ID)); ?>">
 | |
|                                             <?php echo wp_kses_post($prev_post->post_title); ?>
 | |
|                                         </a>
 | |
|                                     </h3>
 | |
|                                 </div>
 | |
|                             </div>
 | |
|                             <?php endif; ?>
 | |
|                             
 | |
| 							<?php global 
 | |
|                                 $post; $next_post = get_next_post();
 | |
|                                 if (!empty($next_post)):
 | |
|                             ?>
 | |
|                             <div class="single-box right">
 | |
|                                 <div class="title-box">
 | |
|                                     <div class="button-box">
 | |
|                                         <a href="<?php echo esc_url(get_permalink($next_post->ID)); ?>"><?php esc_html_e('Next Post', 'thinkai'); ?> <span class="icon-right-arrow1"></span></a>
 | |
|                                     </div>
 | |
|                                     <h3>
 | |
|                                         <a href="<?php echo esc_url(get_permalink($next_post->ID)); ?>">
 | |
|                                             <?php echo wp_kses_post($next_post->post_title); ?>
 | |
|                                         </a>
 | |
|                                     </h3>
 | |
|                                 </div>
 | |
|                             </div>
 | |
|                             <?php endif; ?>
 | |
|                         </div>
 | |
|                         <!--End Blog Prev Next Option-->
 | |
| 						<?php endif; ?>
 | |
|                                                   
 | |
|                         <!--End post-details-->
 | |
|                         <?php comments_template(); ?>
 | |
|                         
 | |
|                 	</div>
 | |
| 					<!--End thm-unit-test-->
 | |
|                 </div>
 | |
|                 <!--End blog-content-->
 | |
| 				<?php endwhile; ?>
 | |
|                 
 | |
|             </div>
 | |
|         	<?php
 | |
| 				if ( $data->get( 'layout' ) == 'right' ) {
 | |
| 					do_action( 'thinkai_sidebar', $data );
 | |
| 				}
 | |
| 			?>
 | |
|         </div>  
 | |
|     </div>
 | |
| </section>
 | |
| <!--End blog area--> 
 | |
| 
 | |
| <?php
 | |
| }
 | |
| get_footer();
 |