<?php
/**
 * Template part for displaying team
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package benqu
 */
if(get_post_meta(get_the_ID(), 'benqu_team_meta', true)) {
    $team_meta = get_post_meta(get_the_ID(), 'benqu_team_meta', true);
} else {
    $team_meta = array();
}

if( array_key_exists( 'designation', $team_meta )) {
    $designation = $team_meta['designation'];
} else {
    $designation = '';
}

if( array_key_exists( 'team_social_info', $team_meta )) {
    $socialIcon = $team_meta['team_social_info'];
} else {
    $socialIcon = '';
}
?>
<div class="bnq__single_team_box d-flex align-items-center">
    <div class="bnq__team_single_img">
        <?php the_post_thumbnail( 'benqu-img-size3' );?>
    </div>
    <div class="bnq__team_single_info">
        <h2><?php the_title();?></h2>
        <span><?php echo esc_html($designation);?></span>
        <?php the_excerpt();?>
        <div class="team__single_social">
            <?php foreach($socialIcon as $item):?>
            <a href="<?php echo esc_url($item['link']);?>" class="<?php echo esc_attr($item['icon']);?>"></a>
            <?php endforeach;?>
        </div>
    </div>
</div>
<?php the_content();?>