        <?php
/**
 * Theme Name: EduCare
 * Theme URI: http://demo.com/educare
 * Author: demo.com
 * Author URI: http://demo.com
 * Description: Themes Is WordPress Theme Market
 * @package eschool
 */
 global $codedokan;
 ?>              
  <?php 
								$count_posts = wp_count_posts( 'masterpiece' )->publish;
								if ($count_posts == 0){
									get_template_part( 'template-parts/html/masterpiece' );
								}else{
								?>                                     
                    <!--=======================
                        Teacher_section Start
                    ==========================--> 
        <section class="teacher_section">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12 col-md-12">
					<?php $masterpiece_students = $codedokan['masterpiece_students']; if($masterpiece_students) { ?>
                       <div class="teacher_title">
							 <?php echo $masterpiece_students;?>
                            <div class="icon_image">
                               <img src="<?php echo get_template_directory_uri(); ?>/assets/images/icon-image.png" alt="">
                            </div>
                       </div>
					<?php } ?>
                       
                        <div class="teacher_list owl-carousel">
                
                            
							<?php
							$how = $codedokan['how_masterpiece'];
									$code_dokan = new WP_Query(array(
										'post_type' => 'masterpiece',
										'offset'     =>0,
										'posts_per_page' =>$how,
										'order'     => 'ASC',
									));
									while($code_dokan->have_posts()) : $code_dokan->the_post(); ?>
							<div class="teacher_wrpp">
							<?php $image = get_post_meta(get_the_ID(),'masterpiec_student_image', true); if($image){?>
                                <div class="teacher_image">
                                    <img src="<?php echo $image; ?>" alt="">
                                </div>
							<?php } ?>
                                <div class="teacher_content">
                                    <h4 class="teacher_name">
										 <a href="<?php the_permalink()?>"> <?php echo get_post_meta(get_the_ID(),'masterpiece_student_name', true); ?> </a>
                                    </h4>
									<?php $class_title = $codedokan['class_title']; if($class_title){ ?>
                                    <h6 class="teacher_deg">
											 <?php echo $class_title; ?> : <?php echo get_post_meta(get_the_ID(),'masterpiece_class_name', true); ?>                           
                                    </h6>
									<?php } ?>
                                </div>
                                
                                
                            </div>
                            
                           <?php endwhile;?>   
                                    
                            
                        </div>
                    </div>
                </div>
            </div>
        </section>
		
		<?php } ?>   
                                       
                    <!--=======================
                        Teacher_section End
                    ==========================--> 