<?php
/**
 * Template part for displaying posts
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package AttorneyPress
 */

?>

<!-- advisors -->
<div class="advisors single-concept-one">
	<div class="container">
		<!-- row -->
		<div class="row">
			<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<!-- single-title -->
				<div class="single-title">
					<h1><?php the_title(); ?></h1>
                    <?php if ( "light" ==( attorneypress_global_var( 'color_scheme','',false ) ) ) { ?>
                         <div class="vc_separator wpb_content_element vc_separator_align_center vc_sep_width_100 vc_sep_border_width_8 vc_sep_pos_align_center vc_separator_no_text vc_custom_1497856957407  vc_custom_1497856957407">
						<span class="vc_sep_holder vc_sep_holder_l">
							<span class="vc_sep_line custom-separator"></span>
						</span>
						<span class="vc_sep_holder vc_sep_holder_r">
							<span class="vc_sep_line custom-separator"></span>
						</span>
					</div>
                            <?php   $icon ="-square"; }
                        else {   $icon =""; ?>
                                        <div class="title-separator">
                                          <span>                                      
                                          </span>
                                        </div>
                       <?php }    ?>
					
				</div>
				<!-- single-title -->
			</div>
		</div>
		<!-- row -->
		<!-- row -->
		<div class="row">
			<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
				<!-- attorney-single-sidebar -->
				<?php
				if ( 'attorney-single-sidebar-style-one' === attorneypress_global_var( 'attorney-single-sidebar-style','',false ) ) {
					$attorney_single_sidebar_style = 'concept-one';
				} elseif ( 'attorney-single-sidebar-style-two' === attorneypress_global_var( 'attorney-single-sidebar-style','',false ) ) {
					$attorney_single_sidebar_style = 'concept-two';
				} else {
					$attorney_single_sidebar_style = '';
				}
				?>
				<div class="attorney-single-sidebar <?php echo esc_attr( $attorney_single_sidebar_style ); ?>">
					<!-- widget -->
					<?php dynamic_sidebar('attorney-listing-sidebar'); ?>
					<!-- widget -->
				</div>
				<!-- attorney-single-sidebar -->
			</div>
			<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
				<!-- single-content -->
				<div class="single-content">
					<?php
					if ( '' !== get_the_post_thumbnail() ) :
						the_post_thumbnail( 'full' );
					else :
						?>
						<img src="<?php echo esc_url( get_parent_theme_file_uri( '/images/no-image-found-370x360.jpg' ) ); ?>" alt="<?php esc_html_e( 'no-image-found', 'attorneypress' ); ?>" width="370" height="360">
					<?php
					endif;
					the_content();
					?>
				</div>
				<!-- single-content -->
			</div>
			<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
				<!-- single-bio -->
				<div class="single-bio">
				    <!-- widget -->
					<div class="widget">
						<h3 class="widget-title"><?php the_title(); ?></h3>
						<?php
						$terms = get_the_terms( get_the_ID(), 'profession' );
						if ( ! empty( $terms ) ) {
							foreach ( $terms as $term ) :
								?>
								<p><?php echo esc_html( $term->name ); ?></p>
								<?php
							endforeach;
						}
						?>
					</div>
					<!-- widget -->
					<!-- widget -->
					<div class="widget">
						<p class="widget-subtitle">Contacts</p>
						<ul class="contact">
							<?php
							$email = get_post_meta( get_the_ID(), 'attorney_email', true );
							$phone = get_post_meta( get_the_ID(), 'attorney_phone', true );
							?>
							<?php if ( ! empty( $email ) ) { ?>
								<li class="email"><i class="fa fa-envelope<?php echo esc_attr($icon); ?>"></i> <a href="mailto:<?php echo sanitize_email( $email ); ?>"><?php echo sanitize_email( $email ); ?></a></li>
							<?php } ?>
							<?php if ( ! empty( $phone ) ) { ?>
								<li class="phone"><i class="fa fa-phone<?php echo esc_attr($icon); ?>"></i> <a href="tel:<?php echo esc_attr( $phone ); ?>"><?php echo esc_html( $phone ); ?></a></li>
							<?php } ?>
						</ul>
						<ul class="social">
							<?php
							$facebook = get_post_meta( get_the_ID(), 'attorney_fb', true );
							$twitter  = get_post_meta( get_the_ID(), 'attorney_twt', true );
							$gplus    = get_post_meta( get_the_ID(), 'attorney_gpl', true );
							$linkedin = get_post_meta( get_the_ID(), 'attorney_ldin', true );
							?>
							<?php if ( ! empty( $facebook ) ) : ?>
								<li class="facebook">
									<a href="<?php echo esc_url( $facebook ); ?>" target="_blank">
										<i class="fa fa-facebook"></i>
									</a>
								</li>
							<?php endif; ?>
							<?php if ( ! empty( $twitter ) ) : ?>
								<li class="twitter">
									<a href="<?php echo esc_url( $twitter ); ?>" target="_blank">
										<i class="fa fa-twitter"></i>
									</a>
								</li>
							<?php endif; ?>
							<?php if ( ! empty( $gplus ) ) : ?>
								<li class="google-plus">
									<a href="<?php echo esc_url( $gplus ); ?>" target="_blank">
										<i class="fa fa-google-plus"></i>
									</a>
								</li>
							<?php endif; ?>
							<?php if ( ! empty( $linkedin ) ) : ?>
								<li class="linkedin">
									<a href="<?php echo esc_url( $linkedin ); ?>" target="_blank">
										<i class="fa fa-linkedin"></i>
									</a>
								</li>
							<?php endif; ?>
						</ul>
					</div>
					<!-- widget -->
					<!-- widget -->
					<div class="widget">
						<p class="widget-subtitle">
							<?php esc_html_e( 'Contact Us', 'attorneypress' ); ?>
						</p>
						<?php echo do_shortcode( '[contact-form-7 id="229" title="Attorney Contact Form (Attroney Bio Concept One)"]' ); ?>
					</div>
					<!-- widget -->
				</div>
				<!-- single-bio -->
			</div>
		</div>
		<!-- row -->
	</div>
</div>
<!-- advisors -->
