<?php get_header(); ?>
<?php $mt_team_position =  get_post_meta($post->ID, "mt_team_position", true); 
   $mt_team_phone =  get_post_meta($post->ID, "mt_team_phone", true);
   $mt_team_email =  get_post_meta($post->ID, "mt_team_mail", true);
   $mt_team_twitter_url =  get_post_meta($post->ID, "mt_team_twitter_url", true);
   $mt_team_facebook_url =  get_post_meta($post->ID, "mt_team_facebook_url", true);
   $mt_team_linkedin_url =  get_post_meta($post->ID, "mt_team_linkedin_url", true);
   ?>
<section class="topSingleBkg topPageBkg topSingleTeam">
   <div class="single-team-info">
      <?php if ( has_post_thumbnail($post->ID ) ): ?>
      <div class="team-img">
         <?php the_post_thumbnail('liberis-image600x500', array('class' => 'img-fluid', 'alt' => '', 'title' => '')); ?>
      </div>
      <div class="team-meta">
         <ul class="post-meta">
            <li class="meta-date"><?php echo esc_html($mt_team_position); ?></li>
         </ul>
         <h1 class="post-title single-post-title"><?php the_title(); ?></h1>
         <ul class="team-contact">
            <?php if (!empty($mt_team_phone) ): ?>
            <li><i class="fas fa-phone-alt"></i> <?php echo esc_html($mt_team_phone);?></li>
            <?php endif; ?>
            <?php if (!empty($mt_team_email) ): ?>
            <li><i class="far fa-envelope"></i> <?php echo esc_html($mt_team_email);?></li>
            <?php endif; ?>
         </ul>
         <ul class="social-media">
            <?php if (!empty($mt_team_twitter_url) ): ?>
            <li><a class="social-twitter" href="<?php echo esc_url($mt_team_twitter_url);?>" target="_blank"><i class="fab fa-twitter"></i></a></li>
            <?php endif; ?>
            <?php if (!empty($mt_team_facebook_url) ): ?>
            <li><a class="social-facebook" href="<?php echo esc_url($mt_team_facebook_url);?>" target="_blank"><i class="fab fa-facebook-f"></i></a></li>
            <?php endif; ?>        
            <?php if (!empty($mt_team_linkedin_url) ): ?>
            <li><a class="social-linkedin" href="<?php echo esc_url($mt_team_linkedin_url);?>" target="_blank"><i class="fab fa-linkedin"></i></a></li>
            <?php endif; ?>
         </ul>
      </div>
      <?php endif; ?>
   </div>
</section>
<section id="wrap-content" class="page-content">
   <div class="container">
      <div class="row">
         <div class="col-md-12">
            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
            <div id="post-<?php the_ID(); ?>" class="page-holder single-post-content custom-page-template">
               <?php the_content(); ?>
            </div>
            <?php  endwhile;
               else: ?>
            <p class="alignc"><?php esc_html_e( 'Sorry, but it seems we can&rsquo;t find what you&rsquo;re looking for. Try the menu above.', 'liberis' ); ?></p>
            <?php endif; ?>
         </div>
         <!--col-md-12-->
      </div>
      <!--row-->
   </div>
   <!--container-->
</section>
<?php get_footer(); ?>