<?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 Buzz_Agency
 */

?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="https://gmpg.org/xfn/11">
	<?php wp_head(); ?>	
</head>

<body <?php body_class(); ?>>
	<?php wp_body_open(); ?>

<div id="page" class="site">
	<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'buzz-agency' ); ?></a>	
	<?php $buzz_agency_breadcrumb = get_theme_mod( 'general_section_options_section', '0' ); 	
	$buzz_agency_breadcrumb_class = '';
	if( !is_home() && is_front_page() ) {
		$slider_option = get_theme_mod('buzz_agency_homepage_setting_slider_option','0' );
		if ( '0' == $slider_option ){
			$buzz_agency_breadcrumb_class = 'no-breadcrumb-wrapper';
		}
	} elseif ( '0' == $buzz_agency_breadcrumb ){
		$buzz_agency_breadcrumb_class = 'no-breadcrumb-wrapper';
	} else{
		$buzz_agency_breadcrumb_class = 'breadcrumb-wrapper';
	}?>

	<header id="masthead" class="site-header <?php echo esc_attr( $buzz_agency_breadcrumb_class );?>">			
		<?php 
			/**
			 * Site Title/Tagline && Navigation
			 */
			do_action('buzz_agency_header_callback_action'); 

			/**
			 * Buzz Agency Slider
			 */
			if( !is_home() && is_front_page()){
			  	do_action('buzz_agency_slider_callback_action'); 
			} ?>	

			<div class="banner-rounded-bg">
			    <span class="banner-shade-1">
			        <span class="banner-shade-2"></span>
			    </span>
			</div>

			<!-- Page breadcrumbs -->
			<?php $breadcrumb_option = get_theme_mod('general_section_options_section',0);
			if ( is_home() || !is_front_page() ){
				if($breadcrumb_option == '1'):	?>
					<div class="page-title-section">
					    <div class="container">
					        <div class="page-title-wrap">
					        	<h2 class=" page-title"> 	            
					        		<?php if ( is_archive() ) {
						                	the_archive_title();
							            }elseif (is_search()) {
							            	/* translators: %s: search term */ 
							            	printf( esc_html__( 'Search Results for: %s', 'buzz-agency' ), '<span>' . get_search_query() . '</span>' );
							            }elseif(is_404()){
							            	esc_html_e( 'Page not Found', 'buzz-agency' ); 
							            }else{	            	
							               echo single_post_title();							            
							            } 
						            ?>						            	
					            </h2>
					            <h3>
					                <div class="breadcrumb-trail breadcrumbs">
					                    <ul class="trail-items">
					                    	<?php $args = array(
					                    		'show_browse'     => false,	
					                    	)?>
					                        <?php breadcrumb_trail( $args );  ?>
					                    </ul>
					                </div>
					            </h3>
					        </div>
					        <?php if ( has_header_image() ) { ?>
						        <div class="page-title-image">
						            <figure class="featured-image">							               
						               	<img src="<?php echo esc_url( ( get_header_image() ) ); ?>" alt="<?php  ( get_bloginfo( 'title'  ) ); ?>" />		
						            </figure>
						        </div>
					        <?php } ?>	
					    </div>
					</div>
				<?php endif; 
			}?>
	</header><!-- #masthead -->

	<div id="content" class="site-content">
		
