<!-- Header
    ================================================== -->
<header class="clearfix white-header-style">

	<nav class="navbar navbar-expand-lg navbar-light bg-light">
		<div class="container">

			<?php $custom_logo = get_post_meta($wp_query->get_queried_object_id(), '_triptip_custom_logo', true) ?>
			<?php 
				$custom_logo_id = get_theme_mod( 'custom_logo' );
			?>
			<a class="navbar-brand" href="<?php echo esc_url(home_url('/')); ?>" title="<?php bloginfo('name'); ?>">

				<?php if($custom_logo!=''){ ?>
				<img src="<?php echo esc_url($custom_logo); ?>" alt="<?php bloginfo('name'); ?>">
				<?php }elseif($custom_logo_id!=''){ ?>
                  <?php $image = wp_get_attachment_image_src( $custom_logo_id , 'full' ); ?>
                	<img src="<?php echo esc_url($image[0]); ?>" alt="<?php bloginfo('name'); ?>" />
                <?php }else{  ?>
                  <?php bloginfo('name'); ?>
                <?php } ?>
			</a>

			<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
				<span class="navbar-toggler-icon"></span>
			</button>

			<div class="collapse navbar-collapse" id="navbarSupportedContent">
				<?php 
					
					$menu_location = 'primary';

					$defaults2= array(
						'theme_location'  => $menu_location,
						'menu'            => '',
						'container'       => '',
						'container_class' => '',
						'container_id'    => '',
						'menu_class'      => 'navbar-nav mr-auto',
						'menu_id'         => '',
						'echo'            => true,
						 'fallback_cb'       => 'triptip_bootstrap_navwalker::fallback',
						 'walker'            => new triptip_bootstrap_navwalker(),
						'before'          => '',
						'after'           => '',
						'link_before'     => '',
						'link_after'      => '',
						'items_wrap'      => '<ul data-breakpoint="800" id="%1$s" class="%2$s">%3$s</ul>',
						'depth'           => 0,
					);
					if ( has_nav_menu( $menu_location ) ) {
						wp_nav_menu( $defaults2 );
					}
				
				?>
				<?php 

					$right_menu= array(
						'theme_location'  => 'right-menu',
						'menu'            => '',
						'container'       => '',
						'container_class' => '',
						'container_id'    => '',
						'menu_class'      => 'navbar-nav ml-auto right-list',
						'menu_id'         => '',
						'echo'            => true,
						 'fallback_cb'       => 'triptip_bootstrap_navwalker::fallback',
						 'walker'            => new triptip_bootstrap_navwalker(),
						'before'          => '',
						'after'           => '',
						'link_before'     => '',
						'link_after'      => '',
						'items_wrap'      => '<ul data-breakpoint="800" id="%1$s" class="%2$s">%3$s</ul>',
						'depth'           => 0,
					);
					if ( has_nav_menu( 'right-menu' ) ) {
						wp_nav_menu( $right_menu );
					}

				?>
				<?php if(function_exists('qkl_get_setting') and qkl_get_setting('header_add')=='on'){ ?>
					<?php 
						$add_id =  qkl_get_setting('add_listing');
						$add_text =  qkl_get_setting('add_text');
					?>
					<a href="<?php echo get_permalink($add_id); ?>" class="add-list-btn btn-default"><i class="fa fa-plus" aria-hidden="true"></i> <?php echo esc_html($add_text); ?></a>
				<?php } ?>
			</div>
		</div>
	</nav>
</header>
<!-- End Header -->