<!-- wraper_header -->
<header class="wraper_header">
	<!-- wraper_header_top -->
	<div class="wraper_header_top <?php echo esc_attr( attorneypress_global_var( 'header_top_show','',false ) ) ? '' : 'hidden-xs'; ?>">
		<div class="container">
			<!-- row -->
			<div class="row header_top">
				<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
					<!-- header_top_item -->
					<div class="header_top_item text-left">
						<!-- header-contact -->
						<ul class="header-contact">
							<?php if ( attorneypress_global_var( 'enable_address','',false ) ) : ?>
								<li>
									<?php if ( "light" ==( attorneypress_global_var( 'color_scheme','',false ) ) ) { ?>
                                                                 
									<i class="fa fa-address-card-o"></i>
                                                                    <?php } else {?>
                                                                        <i class="fa fa-address-card"></i>
                                                                    <?php } ?>  
									<?php echo esc_html( attorneypress_global_var( 'top_header_address','',false ) ); ?>
								</li>
							<?php endif; ?>
						</ul>
						<!-- header-contact -->
					</div>
					<!-- header_top_item -->
				</div>
				<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
					<!-- header_top_item -->
					<div class="header_top_item text-right">
						<!-- header-contact -->
						<ul class="header-contact">
							<?php if ( attorneypress_global_var( 'enable_phone','',false ) ) : ?>
								<li>
									<?php if ( "light" ==( attorneypress_global_var( 'color_scheme','',false ) ) ) { ?>
                                                                 
									<i class="fa fa-phone-square"></i>
                                                                    <?php } else {?>
                                                                        <i class="fa fa-phone"></i>
                                                                    <?php } ?>
									<a href="tel:<?php echo esc_html( attorneypress_global_var( 'top_header_phone','',false ) ); ?>"><?php echo esc_html( attorneypress_global_var( 'top_header_phone','',false ) ); ?></a>
								</li>
							<?php endif; ?>

							<?php if ( attorneypress_global_var( 'enable_email','',false ) ) : ?>
								<li>
									<i class="fa fa-envelope"></i>
									<a href="mailto:<?php echo esc_html( attorneypress_global_var( 'top_header_email','',false ) ); ?>"><?php echo esc_html( attorneypress_global_var( 'top_header_email','',false ) ); ?></a>
								</li>
							<?php endif; ?>
						</ul>
						<!-- header-contact -->
						<!-- header-social -->
						<ul class="header-social">
							<?php if ( attorneypress_global_var( 'enable_facebook','',false ) ) : ?>
								<li class="facebook">
									<a href="<?php echo esc_url( attorneypress_global_var( 'top_header_facebook','',false ) ); ?>"
									   target="_blank">
										<i class="fa fa-facebook"></i>
									</a>
								</li>
							<?php endif; ?>
							<?php if ( attorneypress_global_var( 'enable_twitter','',false ) ) : ?>
								<li class="twitter">
									<a href="<?php echo esc_url( attorneypress_global_var( 'top_header_twitter','',false ) ); ?>"
									   target="_blank">
										<i class="fa fa-twitter"></i>
									</a>
								</li>
							<?php endif; ?>
							<?php if ( attorneypress_global_var( 'enable_linkedin','',false ) ) : ?>
								<li class="linkedin">
									<a href="<?php echo esc_url( attorneypress_global_var( 'top_header_linkedin','',false ) ); ?>"
									   target="_blank">
										<i class="fa fa-linkedin"></i>
									</a>
								</li>
							<?php endif; ?>
							<?php if ( attorneypress_global_var( 'enable_googleplus','',false ) ) : ?>
								<li class="google-plus">
									<a href="<?php echo esc_url( attorneypress_global_var( 'top_header_googleplus','',false ) ); ?>"
									   target="_blank">
										<i class="fa fa-google-plus"></i>
									</a>
								</li>
							<?php endif; ?>
							<?php if ( attorneypress_global_var( 'enable_youtube','',false ) ) : ?>
								<li class="youtube">
									<a href="<?php echo esc_url( attorneypress_global_var( 'top_header_youtube','',false ) ); ?>"
									   target="_blank">
										<i class="fa fa-youtube"></i>
									</a>
								</li>
							<?php endif; ?>
						</ul>
						<!-- header-social -->
					</div>
					<!-- header_top_item -->
				</div>
			</div>
			<!-- row -->
		</div>
	</div>
	<!-- wraper_header_top -->
	<!-- wraper_header_main -->
	<?php if ( attorneypress_global_var( 'sticky_header','',false ) ) { ?>
		<?php
		if ( 1 == attorneypress_global_var( 'sticky_header','',false ) ) {
			$sticky_header_status = 'sticky-active';
		} else {
			$sticky_header_status = 'sticky-deactive';
		}
		?>
	<?php } ?>
	<?php
	if ( 1 == attorneypress_global_var( 'mobile_navigation_position','',false ) ) {
		$mobile_navigation_position = 'mobile-navigation-right';
	} else {
		$mobile_navigation_position = 'mobile-navigation-left';
	}
	?>
	<div class="wraper_header_main <?php echo esc_attr( $sticky_header_status ); ?> <?php echo esc_attr( $mobile_navigation_position ); ?>">
		<div class="container">
			<!-- row -->
			<div class="row">
				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
					<!-- header_main -->
					<div class="header_main">
						<!-- logo -->
						<div class="logo">
							<?php
							$upload_dir = wp_upload_dir();
							//$path = wp_parse_url( esc_url( attorneypress_global_var( 'site_logo','url',true ) ), PHP_URL_PATH );
							// To get the absolute path.
							//$abs_path = $_SERVER['DOCUMENT_ROOT'] . $path; // Input var okay.
							$abs_path = attorneypress_global_var( 'site_logo','url',true );
							$img = wp_get_image_editor( $abs_path );
							if ( ! is_wp_error( $img ) ) {
								$img->resize( 320, null, false );
								$img->set_quality( 100 );
								$img->save( ABSPATH . 'wp-content/themes/attorneypress/images/final/logo.png' );
							?>	
							
							<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
								<img src="<?php echo esc_url( get_parent_theme_file_uri( '/images/final/logo.png' ) ); ?>" alt="<?php esc_html_e( 'logo', 'attorneypress' ); ?>" height="80" width="320">
							</a>
							<?php }
							?>
						</div>
						<!-- logo -->
						<!-- res_nav -->
						<div class="responsive-nav hidden-lg hidden-md visible-sm visible-xs"><i class="fa fa-bars"></i></div>
						<!-- res_nav -->
						<!-- nav -->
						<nav class="nav visible-lg visible-md hidden-sm hidden-xs">
							<?php
							wp_nav_menu(
								array(
									'theme_location' => 'top',
									'fallback_cb'    => false,
								)
							);
							?>
						</nav>
						<!-- nav -->
					</div>
					<!-- header_main -->
				</div>
			</div>
			<!-- row -->
		</div>
	</div>
	<!-- wraper_header_main -->
</header>
<!-- wraper_header -->

<!-- wraper_header_bannerinner -->
<?php if ( is_front_page() && is_home() ) { ?>
	<?php
	$featured_image_url = get_parent_theme_file_uri( '/images/default-inner-banner.jpg' );
	?>
	<div class="wraper_header_bannerinner" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>')">
		<div class="container">
			<!-- row -->
			<div class="row">
				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
					<!-- header_bannerinner -->
					<div class="header_bannerinner">
						<div class="holder">
							<p class="title">
								<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
							</p>
							<p class="subtitle">
								<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
							</p>
						</div>
					</div>
					<!-- header_bannerinner -->
				</div>
			</div>
			<!-- row -->
		</div>
	</div>
<?php } elseif ( is_front_page() ) { ?>
	<?php
	$frontpage_id = get_option( 'page_on_front' );
	$page_featured_image_url = wp_get_attachment_url( get_post_thumbnail_id( $frontpage_id ) );
	if ( ! $page_featured_image_url ) {
		$featured_image_url = get_parent_theme_file_uri( '/images/default-inner-banner.jpg' );
	} else {
		$featured_image_url = $page_featured_image_url;
	}
	if (
		( false === get_post_meta( $post->ID, 'bannercheck', true ) ) ||
		( 'bannerbreadcumbs' === get_post_meta( $post->ID, 'bannercheck', true ) )
	) {
	?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<?php if ( get_post_meta( $post->ID, 'banner_title', true ) ) : ?>
									<p class="title">
										<?php echo esc_html( get_post_meta( $post->ID, 'banner_title', true ) ); ?>
									</p>
								<?php else : ?>
									<p class="title">
										<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
									</p>
									<p class="subtitle">
										<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
									</p>
								<?php endif; ?>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
	<?php } elseif ( 'banneronly' === get_post_meta( $post->ID, 'bannercheck', true ) ) { ?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<?php if ( get_post_meta( $post->ID, 'banner_title', true ) ) : ?>
									<p class="title">
										<?php echo esc_html( get_post_meta( $post->ID, 'banner_title', true ) ); ?>
									</p>
								<?php else : ?>
									<p class="title">
										<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
									</p>
									<p class="subtitle">
										<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
									</p>
								<?php endif; ?>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
	<?php } elseif ( 'breadcumbsonly' === get_post_meta( $post->ID, 'bannercheck', true ) ) { ?>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
	<?php } ?>
<?php } elseif ( is_home() ) { ?>
	<?php
	$blog_id = get_option( 'page_for_posts' );
	$blog_featured_image_url = wp_get_attachment_url( get_post_thumbnail_id( $blog_id ) );
	if ( ! $blog_featured_image_url ) {
		$featured_image_url = get_parent_theme_file_uri( '/images/default-inner-banner.jpg' );
	} else {
		$featured_image_url = $blog_featured_image_url;
	}
	?>
	<?php
	if (
		( false === get_post_meta( $blog_id, 'bannercheck', true ) ) ||
		( 'bannerbreadcumbs' === get_post_meta( $blog_id, 'bannercheck', true ) )
	) {
	?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<?php if ( get_post_meta( $blog_id, 'banner_title', true ) ) : ?>
									<p class="title">
										<?php echo esc_html( get_post_meta( $blog_id, 'banner_title', true ) ); ?>
									</p>
								<?php else : ?>
									<p class="title">
										<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
									</p>
									<p class="subtitle">
										<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
									</p>
								<?php endif; ?>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
	<?php } elseif ( 'banneronly' === get_post_meta( $blog_id, 'bannercheck', true ) ) { ?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<?php if ( get_post_meta( $blog_id, 'banner_title', true ) ) : ?>
									<p class="title">
										<?php echo esc_html( get_post_meta( $blog_id, 'banner_title', true ) ); ?>
									</p>
								<?php else : ?>
									<p class="title">
										<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
									</p>
									<p class="subtitle">
										<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
									</p>
								<?php endif; ?>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
	<?php } elseif ( 'breadcumbsonly' === get_post_meta( $blog_id, 'bannercheck', true ) ) { ?>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
	<?php } ?>
<?php } elseif ( is_singular( 'attorneys' ) || is_tax( 'profession' ) ) { ?>
	<?php
	$attorney_page_info          = get_page_by_path( 'attorneys', OBJECT, 'page' );
	$attorney_page_id            = $attorney_page_info->ID;
	$attorney_featured_img_url   = wp_get_attachment_url( get_post_thumbnail_id( $attorney_page_id ) );
	if ( ! $attorney_featured_img_url ) {
		$featured_image_url = get_parent_theme_file_uri( '/images/default-inner-banner.jpg' );
	} else {
		$featured_image_url = $attorney_featured_img_url;
	}
	?>
	<?php
	if (
		( false === get_post_meta( $attorney_page_id, 'bannercheck', true ) ) ||
		( 'bannerbreadcumbs' === get_post_meta( $attorney_page_id, 'bannercheck', true ) )
	) {
	?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<?php if ( get_post_meta( $attorney_page_id, 'banner_title', true ) ) : ?>
									<p class="title">
										<?php echo esc_html( get_post_meta( $attorney_page_id, 'banner_title', true ) ); ?>
									</p>
								<?php else : ?>
									<p class="title">
										<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
									</p>
									<p class="subtitle">
										<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
									</p>
								<?php endif; ?>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
	<?php } elseif ( 'banneronly' === get_post_meta( $attorney_page_id, 'bannercheck', true ) ) { ?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<?php if ( get_post_meta( $attorney_page_id, 'banner_title', true ) ) : ?>
									<p class="title">
										<?php echo esc_html( get_post_meta( $attorney_page_id, 'banner_title', true ) ); ?>
									</p>
								<?php else : ?>
									<p class="title">
										<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
									</p>
									<p class="subtitle">
										<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
									</p>
								<?php endif; ?>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
	<?php } elseif ( 'breadcumbsonly' === get_post_meta( $attorney_page_id, 'bannercheck', true ) ) { ?>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
	<!-- wraper_header_breadcrumb -->
	<?php } ?>
<?php } elseif ( is_category() || is_archive() || is_tag() || is_author() || is_singular( 'post' ) ) { ?>
	<?php
	$posts_page_id       = get_option( 'page_for_posts' );
	$def_featured_image_url  = wp_get_attachment_url( get_post_thumbnail_id( $posts_page_id ) );
	if ( ! $def_featured_image_url ) {
		$featured_image_url = get_parent_theme_file_uri( '/images/default-inner-banner.jpg' );
	} else {
		$featured_image_url = $def_featured_image_url;
	}
	?>
	<?php
	if (
		( false === get_post_meta( $posts_page_id, 'bannercheck', true ) ) ||
		( 'bannerbreadcumbs' === get_post_meta( $posts_page_id, 'bannercheck', true ) )
	) {
	?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<?php if ( is_category() ) : ?>
									<p class="title">
										<?php
										printf(
											// translators: category name.
											esc_html__( 'Category Archives: %s', 'attorneypress' ),
											single_cat_title( '', false )
										);
										?>
									</p>
									<?php
									// Show an optional category description.
									if ( category_description() ) :
									?>
										<div class="subtitle">
											<?php echo category_description(); ?>
										</div>
									<?php endif; ?>
								<?php elseif ( is_author() ) : ?>
									<p class="title">
										<?php
										printf(
											// translators: Author Name.
											esc_html__( 'All posts by %s', 'attorneypress' ),
											'<span class="vcard"><a class="url fn n" href="' .
											esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) .
											'" title="' .
											esc_attr( get_the_author() ) .
											'" rel="me">' .
											get_the_author() .
											'</a></span>'
										);
										?>
									</p>
								<?php elseif ( is_tag() ) : ?>
									<p class="title">
										<?php
										printf(
											// translators: Tag Name.
											esc_html__( 'Tag Archives: %s', 'attorneypress' ),
											single_tag_title( '', false )
										);
										?>
									</p>
									<?php
									// Show an optional tag description.
									if ( tag_description() ) :
									?>
										<div class="subtitle">
											<?php echo tag_description(); ?>
										</div>
									<?php endif; ?>
								<?php elseif ( is_archive() ) : ?>
									<p class="title">
										<?php
										if ( is_day() ) :
											printf(
												// translators: Date.
												esc_html__( 'Daily Archives: %s', 'attorneypress' ),
												get_the_date()
											);
										elseif ( is_month() ) :
											printf(
												// translators: Month and Date.
												esc_html__( 'Monthly Archives: %s', 'attorneypress' ),
												get_the_date( _x( 'F Y', 'monthly archives date format', 'attorneypress' ) )
											);
										elseif ( is_year() ) :
											printf(
												// translators: Month Date, Year.
												esc_html__( 'Yearly Archives: %s', 'attorneypress' ),
												get_the_date( _x( 'Y', 'yearly archives date format', 'attorneypress' ) )
											);
										else :
											esc_html__( 'Archives', 'attorneypress' );
										endif;
										?>
									</p>
								<?php else : ?>
									<?php if ( get_post_meta( $posts_page_id, 'banner_title', true ) ) : ?>
									<p class="title">
										<?php echo esc_html( get_post_meta( $posts_page_id, 'banner_title', true ) ); ?>
									</p>
								<?php else : ?>
									<p class="title">
										<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
									</p>
									<p class="subtitle">
										<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
									</p>
								<?php endif; ?>

								<?php endif; ?>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
	<?php } elseif ( 'banneronly' === get_post_meta( $posts_page_id, 'bannercheck', true ) ) { ?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<?php if ( is_category() ) : ?>
									<p class="title">
										<?php
										printf(
											// translators: category name.
											esc_html__( 'Category Archives: %s', 'attorneypress' ),
											single_cat_title( '', false )
										);
										?>
									</p>
									<?php
									// Show an optional category description.
									if ( category_description() ) :
									?>
										<div class="subtitle">
											<?php echo category_description(); ?>
										</div>
									<?php endif; ?>
								<?php elseif ( is_author() ) : ?>
									<p class="title">
										<?php
										printf(
											// translators: Author Name.
											esc_html__( 'All posts by %s', 'attorneypress' ),
											'<span class="vcard"><a class="url fn n" href="' .
											esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) .
											'" title="' .
											esc_attr( get_the_author() ) .
											'" rel="me">' .
											get_the_author() .
											'</a></span>'
										);
										?>
									</p>
								<?php elseif ( is_tag() ) : ?>
									<p class="title">
										<?php
										printf(
											// translators: Tag Name.
											esc_html__( 'Tag Archives: %s', 'attorneypress' ),
											single_tag_title( '', false )
										);
										?>
									</p>
									<?php
									// Show an optional tag description.
									if ( tag_description() ) :
									?>
										<div class="subtitle">
											<?php echo tag_description(); ?>
										</div>
									<?php endif; ?>
								<?php elseif ( is_archive() ) : ?>
									<p class="title">
										<?php
										if ( is_day() ) :
											printf(
												// translators: Date.
												esc_html__( 'Daily Archives: %s', 'attorneypress' ),
												get_the_date()
											);
										elseif ( is_month() ) :
											printf(
												// translators: Month and Date.
												esc_html__( 'Monthly Archives: %s', 'attorneypress' ),
												get_the_date( _x( 'F Y', 'monthly archives date format', 'attorneypress' ) )
											);
										elseif ( is_year() ) :
											printf(
												// translators: Month Date, Year.
												esc_html__( 'Yearly Archives: %s', 'attorneypress' ),
												get_the_date( _x( 'Y', 'yearly archives date format', 'attorneypress' ) )
											);
										else :
											esc_html__( 'Archives', 'attorneypress' );
										endif;
										?>
									</p>
								<?php else : ?>
									<?php if ( get_post_meta( $posts_page_id, 'banner_title', true ) ) : ?>
									<p class="title">
										<?php echo esc_html( get_post_meta( $posts_page_id, 'banner_title', true ) ); ?>
									</p>
								<?php else : ?>
									<p class="title">
										<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
									</p>
									<p class="subtitle">
										<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
									</p>
								<?php endif; ?>

								<?php endif; ?>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
	<?php } elseif ( 'breadcumbsonly' === get_post_meta( $posts_page_id, 'bannercheck', true ) ) { ?>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
	<?php } ?>
<?php } elseif ( is_singular( 'practice-areas' ) ) { ?>
	<?php
	$practice_areas_page_info        = get_page_by_path( 'practice-areas', OBJECT, 'page' );
	$practice_areas_page_id          = $practice_areas_page_info->ID;
	$practice_areas_featured_img_url = wp_get_attachment_url( get_post_thumbnail_id( $practice_areas_page_id ) );
	if ( ! $practice_areas_featured_img_url ) {
		$featured_image_url = get_parent_theme_file_uri( '/images/default-inner-banner.jpg' );
	} else {
		$featured_image_url = $practice_areas_featured_img_url;
	}
	?>
	<?php
	if (
		( false === get_post_meta( $practice_areas_page_id, 'bannercheck', true ) ) ||
		( 'bannerbreadcumbs' === get_post_meta( $practice_areas_page_id, 'bannercheck', true ) )
	) {
	?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<?php if ( get_post_meta( $practice_areas_page_id, 'banner_title', true ) ) : ?>
									<p class="title">
										<?php echo esc_html( get_post_meta( $practice_areas_page_id, 'banner_title', true ) ); ?>
									</p>
								<?php else : ?>
									<p class="title">
										<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
									</p>
									<p class="subtitle">
										<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
									</p>
								<?php endif; ?>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
	<?php } elseif ( 'banneronly' === get_post_meta( $practice_areas_page_id, 'bannercheck', true ) ) { ?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<?php if ( get_post_meta( $practice_areas_page_id, 'banner_title', true ) ) : ?>
									<p class="title">
										<?php echo esc_html( get_post_meta( $practice_areas_page_id, 'banner_title', true ) ); ?>
									</p>
								<?php else : ?>
									<p class="title">
										<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
									</p>
									<p class="subtitle">
										<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
									</p>
								<?php endif; ?>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
	<?php } elseif ( 'breadcumbsonly' === get_post_meta( $practice_areas_page_id, 'bannercheck', true ) ) { ?>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
	<?php } ?>
<?php } elseif ( is_404() ) { ?>
	<?php
	if ( attorneypress_global_var( 'page_not_found_banner_image','url',true ) ) {
		$page_not_found_banner_image_link = esc_url( attorneypress_global_var( 'page_not_found_banner_image','url',true ) );
		$featured_image_url = $page_not_found_banner_image_link;

	} else {
		$featured_image_url = get_parent_theme_file_uri( '/images/default-inner-banner.jpg' );
	}
	?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<p class="title"><?php echo esc_html( attorneypress_global_var( 'page_not_found_banner_title','',false ) ); ?></p>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
<?php } elseif ( is_search() ) { ?>
	<?php
	$posts_page_id       = get_option( 'page_for_posts' );
	if ( attorneypress_global_var( 'search_page_banner_image','url',true ) ) {
		$search_page_banner_image_link = esc_url( attorneypress_global_var( 'search_page_banner_image','url',true ) );
		$featured_image_url = $search_page_banner_image_link;

	} else {
		$featured_image_url = get_parent_theme_file_uri( '/images/default-inner-banner.jpg' );
	}
	?>
	<?php if ( ( false === get_post_meta( $posts_page_id, 'bannercheck', true ) ) || ( 'bannerbreadcumbs' === get_post_meta( $posts_page_id, 'bannercheck', true ) ) ) { ?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<p class="title"><?php echo esc_html( attorneypress_global_var( 'search_page_banner_title','',false ) ); ?></p>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
	<?php } elseif ( 'banneronly' === get_post_meta( $posts_page_id, 'bannercheck', true ) ) { ?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<p class="title"><?php echo esc_html( attorneypress_global_var( 'search_page_banner_title','',false ) ); ?></p>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
	<?php } elseif ( 'breadcumbsonly' === get_post_meta( $posts_page_id, 'bannercheck', true ) ) { ?>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
	<?php } ?>
<?php } else { ?>
	<?php
	$attorneypress_banner_image = wp_get_attachment_url( get_post_thumbnail_id( get_the_id() ) );
	if ( ! $attorneypress_banner_image ) {
		$featured_image_url = get_parent_theme_file_uri( '/images/default-inner-banner.jpg' );
	} else {
		$featured_image_url = $attorneypress_banner_image;
	}
	?>
	<?php if ( ( false === get_post_meta( $post->ID, 'bannercheck', true ) ) || ( 'bannerbreadcumbs' === get_post_meta( $post->ID, 'bannercheck', true ) ) ) { ?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<?php if ( get_post_meta( $post->ID, 'banner_title', true ) ) : ?>
									<p class="title">
										<?php echo esc_html( get_post_meta( $post->ID, 'banner_title', true ) ); ?>
									</p>
								<?php else : ?>
									<p class="title">
										<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
									</p>
									<p class="subtitle">
										<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
									</p>
								<?php endif; ?>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
	<?php } elseif ( 'banneronly' === get_post_meta( $post->ID, 'bannercheck', true ) ) { ?>
		<div class="wraper_header_bannerinner <?php echo esc_attr( attorneypress_global_var( 'header_innerbanner_show','',false ) ) ? '' : 'hidden-xs'; ?>" style="background-image:url('<?php echo esc_url( $featured_image_url ); ?>');">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_bannerinner -->
						<div class="header_bannerinner">
							<div class="holder">
								<?php if ( get_post_meta( $post->ID, 'banner_title', true ) ) : ?>
									<p class="title">
										<?php echo esc_html( get_post_meta( $post->ID, 'banner_title', true ) ); ?>
									</p>
								<?php else : ?>
									<p class="title">
										<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
									</p>
									<p class="subtitle">
										<?php echo esc_html( get_bloginfo( 'description' ) ); ?>
									</p>
								<?php endif; ?>
							</div>
						</div>
						<!-- header_bannerinner -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
	<?php } elseif ( 'breadcumbsonly' === get_post_meta( $post->ID, 'bannercheck', true ) ) { ?>
		<!-- wraper_header_breadcrumb -->
		<div class="wraper_header_breadcrumb">
			<div class="container">
				<!-- row -->
				<div class="row">
					<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<!-- header_breadcrumb -->
						<div class="header_breadcrumb">
							<?php
							if ( function_exists( 'attorneypress_breadcrumbs' ) ) {
								attorneypress_breadcrumbs();
							}
							?>
						</div>
						<!-- header_breadcrumb -->
					</div>
				</div>
				<!-- row -->
			</div>
		</div>
		<!-- wraper_header_breadcrumb -->
	<?php } ?>
<?php } ?>
<!-- wraper_header_bannerinner -->
