<?php global $picart;?>
<?php get_header(); ?>

<div class="page_fullwidth_wrap layer_wrapper">
    <!--CUSTOM PAGE HEADER STARTS-->
        <?php get_template_part('sktframe/core','pageheader'); ?>
    <!--CUSTOM PAGE HEADER ENDS-->
	<div id="content">
		<div class="center">
           <!--POST START-->
			<div class="single_wrap no_sidebar">
				<div class="single_post">

                   <?php if(have_posts()): ?><?php while(have_posts()): ?><?php the_post(); ?>
                    <div <?php post_class(); ?> id="post-<?php the_ID(); ?>"> 
                        
                    <!--EDIT BUTTON START-->
						<?php if ( is_user_logged_in() && is_admin() ) { ?>
                            <div class="edit_wrap">
                            	<a href="<?php echo get_edit_post_link(); ?>">
                            		<?php _e('Edit','picart'); ?>
                                </a>
                            </div>
                        <?php } ?>
    				<!--EDIT BUTTON END-->
                    <!--POST START-->
                        <div class="single_post_content">
                            <h1 class="postitle entry-title"><?php the_title(); ?></h1>
                            <!--POST CONTENT START-->
                                <div class="thn_post_wrap teamwrap">
                        <?php
                        if ( has_post_thumbnail() ) {
                        ?><?php the_post_thumbnail( array(300,300)); ?>
                        <?php }else{ ?>
                        <img src="<?php echo get_template_directory_uri(); ?>/images/team_thumb.jpg" />
                        <?php } ?>
                        <?php the_content(); ?>
			
			<?php $designation = esc_html( get_post_meta( get_the_ID(), 'designation', true ) );?>
			<?php if(!empty($designation)) { ?>
            <span>(<?php echo $designation; ?>)</span>
            <?php } ?>
            <div class="social-icons" style="margin-top:10px;">
                <?php $facebook = esc_html( get_post_meta( get_the_ID(), 'facebook', true ) );?>
                <?php $facebooklink = esc_html( get_post_meta( get_the_ID(), 'facebooklink', true ) );?>
                <?php $twitter = esc_html( get_post_meta( get_the_ID(), 'twitter', true ) );?>
                <?php $twitterlink = esc_html( get_post_meta( get_the_ID(), 'twitterlink', true ) );?>
                <?php $googleplus = esc_html( get_post_meta( get_the_ID(), 'googleplus', true ) );?>
                <?php $googlepluslink = esc_html( get_post_meta( get_the_ID(), 'googlepluslink', true ) );?>
                <?php $linkedin = esc_html( get_post_meta( get_the_ID(), 'linkedin', true ) );?>
                <?php $linkedinlink = esc_html( get_post_meta( get_the_ID(), 'linkedinlink', true ) );?>
                <?php $pinterest = esc_html( get_post_meta( get_the_ID(), 'pinterest', true ) );?>
                <?php $pinterestlink = esc_html( get_post_meta( get_the_ID(), 'pinterestlink', true ) );?>
                <?php 
                if( $facebook != '' ){
             		echo '<a href="'.$facebooklink.'" title="'.$facebook.'" target="_blank"><i class="fa fa-'.$facebook.' fa-lg"></i></a>';
                }
                if( $twitter != '' ){
              		echo '<a href="'.$twitterlink.'" title="'.$twitter.'" target="_blank"><i class="fa fa-'.$twitter.' fa-lg"></i></a>';
                }
                if( $googleplus != '' ){
               		echo '<a href="'.$googlepluslink.'" title="'.$googleplus.'" target="_blank"><i class="fa fa-'.$googleplus.' fa-lg"></i></a>';
                }						
                if( $linkedin != '' ){
               		echo '<a href="'.$linkedinlink.'" title="'.$linkedin.'" target="_blank"><i class="fa fa-'.$linkedin.' fa-lg"></i></a>';
                }
                if( $pinterest != '' ){
              		echo '<a href="'.$pinterestlink.'" title="'.$pinterest.'" target="_blank"><i class="fa fa-'.$pinterest.' fa-lg"></i></a>';
                }
                ?>
            </div>
			</div>
                                	<div style="clear:both"></div>
                                 
                            <!--POST CONTENT END-->
                        </div>
                    <!--POST END-->
                    </div>
            <?php endwhile ?> 
       
            <?php endif ?>
 			</div>
</div>
		</div><!--center class END-->
	</div><!--#content END-->
</div><!--layer_wrapper class END-->

<?php get_footer(); ?>