<?php
/**
 * The header for our theme
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package WordPress
 * @subpackage WPCargo_Theme_Pro
 * @since 1.0
 * @version 1.0
 */
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js no-svg">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php do_action( 'wpctp_before_page' ); ?>
<div id="page" class="site">
	<?php  $header_layout = wpctp_get_option( 'header_layout' ); ?>
    <?php do_action( 'wpctp_before_header' ); ?>
	<header id="masthead" class="site-header header-<?php echo $header_layout; ?>" role="banner">
		<?php if( has_post_thumbnail() ) : ?><div class="header-image"></div><?php endif; ?>  
        <?php do_action( 'wpctp_before_header_layout' ); ?>          
        <?php get_template_part( "template-parts/header/{$header_layout}" ); ?>
        <?php do_action( 'wpctp_after_header_layout' ); ?>
        <?php global $wp_query; ?>
        <?php if( ! is_home() && ! is_front_page() ) : ?>
            <div class="entry-header-wrap relative">
            	<?php do_action( 'wpctp_before_entry_header' ); ?>
                <header class="entry-header">
                    <?php if ( is_search() ) : ?>
                        <?php if ( have_posts() ) : ?>
                            <h1 class="wpctp-title entry-title"><?php printf( __( 'Search Results for: %s', 'wpctp' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
                        <?php else : ?>
                            <h1 class="wpctp-title entry-title"><?php _e( 'Nothing Found', 'wpctp' ); ?></h1>
                        <?php endif; ?>
                    <?php elseif ( is_author() ) : ?>
                        <h1 class="wpctp-title entry-title"><?php echo get_the_author_meta( 'display_name', (int) get_query_var( 'author' ) ); ?></h1>
                    <?php elseif ( is_archive() ) : ?>
                        <?php if ( function_exists( 'is_shop' ) ) : ?>
                            <h1 class="bh-title entry-title"><?php woocommerce_page_title(); ?></h1>
                        <?php else : ?>
                            <h1 class="bh-title entry-title"><?php single_cat_title( '', true ); ?></h1>
                            <?php the_archive_description( '<div class="taxonomy-description">', '</div>' ); ?>
                        <?php endif; ?>
                    <?php elseif ( is_404() ) : ?>
                        <h1 class="wpctp-title entry-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'wpctp' ); ?></h1>
                    <?php else : ?>
                        <?php the_title( '<h1 class="wpctp-title entry-title">', '</h1>' ); ?>
                    <?php endif; ?>
                </header><!-- .entry-header -->
            	<?php do_action( 'wpctp_after_entry_header' ); ?>
            </div>
        <?php endif; ?>
    	<?php do_action( 'wpctp_header' ); ?>
	</header><!-- #masthead -->
	<?php do_action( 'wpctp_after_header' ); ?>
	<?php do_action( 'wpctp_before_content' ); ?>
	<div id="content" class="site-content wpctp-site-container">
    	<?php do_action( 'wpctp_after_get_header' ); ?>