<?php if(get_theme_mod('roland_doctor_enable')) : ?>
	<!-- Start Doctor -->
	<section class="doctors-area">
		<div class="container">
			<div class="row">
				<div class="col-lg-8 col-md-10 col-12">
					<!-- Section Title -->
					<div class="section-title">
						<?php
							$roland_d_bg_title = get_theme_mod('roland_d_bg_title');
							$roland_d_title = get_theme_mod('roland_d_title');
							$roland_d_content = get_theme_mod('roland_d_content');
							$roland_d_icon = get_theme_mod('roland_d_icon');
						?>
						<?php if(! empty (get_theme_mod('roland_d_title'))) : ?>
						<?php if(! empty (get_theme_mod('roland_d_bg_title'))) : ?>
						<span class="bg-title"><?php echo esc_html($roland_d_bg_title); ?></span>
						<?php endif ; ?>
						<h2><?php echo esc_html($roland_d_title); ?> <span><?php echo esc_html($roland_d_content); ?></span></h2>
						<div class="title-icon-main">
							<div class="title-icon">
								<i class="<?php echo esc_attr($roland_d_icon); ?>"></i>
							</div>
							<div class="waves-block">
								<div class="waves wave-1"></div>
								<div class="waves wave-2"></div>
								<div class="waves wave-3"></div>
							</div>
						</div>	
						<?php endif;?>
					</div>
					<!-- End Section Title -->
				</div>
			</div>
			<div class="row">
				<?php 
					$k=1; 
						for($i=1;$i<=4;$i++){
							$roland_doctor_page[$k]=get_theme_mod('roland_doctor_page_'.$i);
							$roland_doctor_position[$k]=get_theme_mod('roland_doctor_position_'.$i);
							
							$roland_ts_icon_1[$k]=get_theme_mod('roland_ts_icon_1_'.$i);
							$roland_ts_link_1[$k]=get_theme_mod('roland_ts_link_1_'.$i);
							$roland_ts_icon_2[$k]=get_theme_mod('roland_ts_icon_2_'.$i);
							$roland_ts_link_2[$k]=get_theme_mod('roland_ts_link_2_'.$i);
							$roland_ts_icon_3[$k]=get_theme_mod('roland_ts_icon_3_'.$i);
							$roland_ts_link_3[$k]=get_theme_mod('roland_ts_link_3_'.$i);
							$roland_ts_icon_4[$k]=get_theme_mod('roland_ts_icon_4_'.$i);
							$roland_ts_link_4[$k]=get_theme_mod('roland_ts_link_4_'.$i);
							$k=$k+1;
						}
						
						$args = array (
							'post_type' => 'page',
							'post_per_page' => $i,
							'post__in'      => $roland_doctor_page,
							'orderby'           =>'post__in',
						);
						
						$roland_doctorloop = new WP_Query($args);
						$j=1;

						if ($roland_doctorloop->have_posts()) :  while ($roland_doctorloop->have_posts()) : $roland_doctorloop->the_post();
							
				?>
				<div class="col-lg-4 col-md-4 col-12">
				
					<!-- Single Doctor -->
					<div class="single-doctor">
						<div class="doctor-head">
						<?php if( has_post_thumbnail()) : ?>
							<?php the_post_thumbnail('roland-doctor-thumb'); ?>
						<?php endif; ?>
							<!-- Doctor Hover -->
							<div class="doctor-hover">
								<div class="doctor-s-top">
									<!-- Doctor Socail -->
									<ul class="social-list">
										<?php if (!empty ($roland_ts_icon_1[$j])) :?>
										<li><a href="<?php echo esc_url($roland_ts_link_1[$j]) ;?>" aria-label="<?php esc_attr_e('Social Icon', 'roland'); ?>"><i class="fa <?php echo esc_attr($roland_ts_icon_1[$j]) ;?>"></i></a></li>
										<?php endif; ?>
										<?php if (!empty ($roland_ts_icon_2[$j])) :?>
										<li><a href="<?php echo esc_url($roland_ts_link_2[$j]) ;?>" aria-label="<?php esc_attr_e('Social Icon', 'roland'); ?>"><i class="fa <?php echo esc_attr($roland_ts_icon_2[$j]) ;?>"></i></a></li>
										<?php endif; ?>
										<?php if (!empty ($roland_ts_icon_3[$j])) :?>
										<li><a href="<?php echo esc_url($roland_ts_link_3[$j]) ;?>" aria-label="<?php esc_attr_e('Social Icon', 'roland'); ?>"><i class="fa <?php echo esc_attr($roland_ts_icon_3[$j]) ;?>"></i></a></li>
										<?php endif; ?>
										<?php if (!empty ($roland_ts_icon_4[$j])) :?>
										<li><a href="<?php echo esc_url($roland_ts_link_4[$j]) ;?>" aria-label="<?php esc_attr_e('Social Icon', 'roland'); ?>"><i class="fa <?php echo esc_attr($roland_ts_icon_4[$j]) ;?>"></i></a></li>
										<?php endif; ?>
									</ul>
								</div>
							</div>
						</div>
						<div class="doctor-content">
							<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
							<span><?php echo esc_html($roland_doctor_position[$j]) ;?></span>
						</div>
					</div>
					<!-- End Single Doctor -->
				</div>
				<?php $j=$j+1; 
					endwhile;
					wp_reset_postdata();  
				endif; ?>
			</div>
		</div>
	</section>
	<!--/ End Doctor -->
<?php endif;?>