/home/awneajlw/www/decenttraders.online/wp-content/themes/diziti/single-team.php
<?php get_header();
$data = \DIZITI\Includes\Classes\Common::instance()->data('single-team')->get();
do_action( 'diziti_banner', $data )
?>
<?php while (have_posts()) : the_post(); ?>
<!-- Team Details Section Start -->
<section class="team-details-section fix section-padding pb-0">
<div class="container">
<div class="team-details-wrapper style1">
<div class="row g-5">
<div class="col-lg-7">
<div class="team-details-content">
<div class="details-info">
<h3 class="wow fadeInUp" data-wow-delay=".4s"><?php the_title(); ?></h3>
<?php if(get_post_meta( get_the_id(), 'designation', true)); { ?><span class="wow fadeInUp" data-wow-delay=".5s"><?php echo (get_post_meta( get_the_id(), 'designation', true ));?></span><?php } ?>
<div class="mt-3 mb-3 wow fadeInUp" data-wow-delay=".6s">
<?php the_content();?>
</div>
</div>
<div class="row">
<?php if(get_post_meta( get_the_id(), 'address', true)); { ?>
<div class="col-sm-6 col-xxl-4">
<div class="author-meta wow fadeInUp" data-wow-delay=".3s">
<div class="fancy-box style1">
<div class="item"><i class="fa-regular fa-location-dot"></i></div>
<div class="item">
<h6><?php esc_html_e('Address', 'diziti'); ?></h6>
<p><?php echo (get_post_meta( get_the_id(), 'address', true ));?></p>
</div>
</div>
</div>
</div>
<?php } ?>
<?php if(get_post_meta( get_the_id(), 'phone', true)); { ?>
<div class="col-sm-6 col-xxl-4">
<div class="author-meta wow fadeInUp" data-wow-delay=".5s">
<div class="fancy-box style1">
<div class="item"><i class="fa-regular fa-phone"></i></div>
<div class="item">
<h6><?php esc_html_e('Phone Number', 'diziti'); ?></h6>
<p><a href="tel:<?php echo (get_post_meta( get_the_id(), 'phone', true ));?>"><?php echo (get_post_meta( get_the_id(), 'phone', true ));?></a></p>
</div>
</div>
</div>
</div>
<?php } ?>
<?php if(get_post_meta( get_the_id(), 'email', true)); { ?>
<div class="col-sm-12 col-xxl-4">
<div class="author-meta wow fadeInUp" data-wow-delay=".7s">
<div class="fancy-box style1">
<div class="item"><i class="fa-regular fa-envelope"></i></div>
<div class="item">
<h6><?php esc_html_e('Email', 'diziti'); ?></h6>
<p><a href="mailto:<?php echo (get_post_meta( get_the_id(), 'email', true ));?>"><?php echo (get_post_meta( get_the_id(), 'email', true ));?></a></p>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
<div class="col-lg-5">
<div class="team-details-image">
<?php if(has_post_thumbnail()){ ?>
<div class="team-thumb wow fadeInUp" data-wow-delay=".6s">
<?php the_post_thumbnail('diziti_510x537'); ?>
</div>
<?php } ?>
<?php
$icons = get_post_meta(get_the_id(), 'social_media_tabs', true); if ($icons) :
?>
<div class="social-profile">
<ul>
<?php
for ( $i=0; $i < count( $icons['select_social_media'] ); $i++ ) {
$social_icon = ( isset( $icons['select_social_media'][$i] ) && !empty( $icons['select_social_media'][$i] ) ) ? $icons['select_social_media'][$i] : '';
$social_link = ( isset( $icons['link_social_media'][$i] ) && !empty( $icons['link_social_media'][$i] ) ) ? $icons['link_social_media'][$i] : '';
?>
<li><a target="_blank" href="<?php echo esc_url($social_link); ?>"><i class="fab <?php echo esc_attr(str_replace("fa ", " ", $social_icon)); ?>"></i></a></li>
<?php } ?>
</ul>
</div>
<?php endif; ?>
</div>
</div>
</div>
<div class="team-single-history mt-3">
<?php if(get_post_meta( get_the_id(), 'about_title', true)); { ?>
<div class="title">
<h3 class="wow fadeInUp" data-wow-delay=".4s"><?php echo (get_post_meta( get_the_id(), 'about_title', true ));?></h3>
</div>
<?php } ?>
<?php if(get_post_meta( get_the_id(), 'about_text', true)); { ?>
<p class="mt-3 wow fadeInUp" data-wow-delay=".6s">
<?php echo (get_post_meta( get_the_id(), 'about_text', true ));?>
</p>
<?php } ?>
<?php if(get_post_meta( get_the_id(), 'about_text2', true)); { ?>
<p class="mt-4 wow fadeInUp" data-wow-delay=".8s">
<?php echo (get_post_meta( get_the_id(), 'about_text2', true ));?>
</p>
<?php } ?>
</div>
</div>
</div>
</section>
<!-- Team Details Section End -->
<?php
$icons = get_post_meta(get_the_id(), 'advantages_tabs', true); if ($icons) :
?>
<!-- Faq Section Start -->
<section class="faq-section-2 fix section-padding">
<div class="container">
<div class="faq-wrapper">
<div class="row g-5">
<?php if(get_post_meta( get_the_id(), 'advantage_title', true)); { ?>
<div class="col-12">
<div class="title-area mb-10 text-center">
<h2 class="single-section-title wow fadeInUp" data-wow-delay=".6s"><?php echo (get_post_meta( get_the_id(), 'advantage_title', true ));?></h2>
</div>
</div>
<?php } ?>
<div class="col-xl-6 col-md-12 mb-40 wow fadeInUp" data-wow-delay=".6s">
<div class="accordion" id="accordionExample">
<?php
$countss = 1; // Initialize counter
for ($i = 0; $i < count($icons['advantages_title']); $i++) {
$advantages_title = (isset($icons['advantages_title'][$i]) && !empty($icons['advantages_title'][$i])) ? $icons['advantages_title'][$i] : '';
$advantages_text = (isset($icons['advantages_text'][$i]) && !empty($icons['advantages_text'][$i])) ? $icons['advantages_text'][$i] : '';
// Generate unique IDs for each accordion item
$collapseId = "collapse" . $countss;
$isActive = ($countss === 1) ? 'show' : ''; // Active class for the first item
$isCollapsed = ($countss === 1) ? '' : 'collapsed'; // Button class for inactive items
?>
<div class="ct-accordion-item style1 mb-20">
<h2 class="ct-accordion-header style1">
<button class="ct-accordion-button <?php echo $isCollapsed; ?>" type="button"
data-bs-toggle="collapse" data-bs-target="#<?php echo $collapseId; ?>"
aria-expanded="<?php echo ($countss === 1) ? 'true' : 'false'; ?>"
aria-controls="<?php echo $collapseId; ?>">
<strong><?php echo wp_kses($advantages_title, true); ?></strong>
<span class="plus"><i class="fa-solid fa-plus"></i></span>
<span class="minus"><i class="fa-solid fa-minus"></i></span>
</button>
</h2>
<div id="<?php echo $collapseId; ?>" class="ct-accordion-collapse collapse <?php echo $isActive; ?>"
data-bs-parent="#accordionExample">
<div class="ct-accordion-body">
<p><?php echo wp_kses($advantages_text, true); ?></p>
</div>
</div>
</div>
<?php
$countss++; // Increment counter
}
?>
</div>
</div>
<div class="col-lg-6 wow fadeInUp" data-wow-delay=".4s">
<div class="faq-image">
<?php $project_image = get_post_meta( get_the_id(), 'project_image', true ); ?>
<img src="<?php echo wp_get_attachment_url($project_image['id']);?>" alt="<?php bloginfo( 'name' ); ?>">
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Faq Section End -->
<?php endif; ?>
<?php endwhile; ?>
<?php get_footer(); ?>