File: /home/httpd/vhosts/rajlaw.com.tw/httpdocs/wp-content/themes/advokat/inc/header/header-style4.php
<?php
/*
Header Style 4
*/
global $advokat_option;
$sticky = $advokat_option['off_sticky'];
$sticky_menu = ($sticky == 1) ? ' menu-sticky' : '';
$header_width_meta = get_post_meta(get_the_ID(), 'header_width_custom', true);
if ($header_width_meta != ''){
$header_width = ( $header_width_meta == 'full' ) ? 'container-fluid': 'container';
}else{
$header_width = $advokat_option['header-grid'];
$header_width = ( $header_width == 'full' ) ? 'container-fluid': 'container';
}
$rs_top_search = get_post_meta(get_the_ID(), 'select-search', true);
$rs_show_cart = get_post_meta(get_the_ID(), 'show-cart-icon', true);
$rs_offcanvas = get_post_meta(get_the_ID(), 'show-off-canvas', true);
$rs_headicons = get_post_meta(get_the_ID(), 'show-head-icons', true);
$rs_show_quote = get_post_meta(get_the_ID(), 'show-quote', true);
$single_head = "";
if( is_page_template( 'page-single.php' ) ) {
$single_head = "single-header single-headers";
}
?>
<header id="rs-header" class="header-style-4 <?php echo esc_attr($single_head); ?>">
<div class="header-inner<?php echo esc_attr($sticky_menu);?>">
<!-- Toolbar Start -->
<?php
get_template_part('inc/header/top-head/top-head','two');
?>
<!-- Toolbar End -->
<!-- Logo Area Start -->
<div class="logo-section">
<div class="<?php echo esc_attr($header_width);?>">
<div class="row-table">
<div class="col-cell">
<?php get_template_part('inc/header/logo'); ?>
</div>
<?php if(!empty($advokat_option['phone']) || !empty($advokat_option['top-email']) || !empty($advokat_option['top-location'])){?>
<div class="col-cell col-xs-12">
<div class="toolbar-contact-style4">
<ul class="rs-contact-info">
<?php if(!empty($advokat_option['phone'])) { ?>
<li class="rs-contact-phone">
<i class="fa flaticon-call"></i>
<span class="contact-inf">
<span><?php if(!empty($advokat_option['phone-pretext'])): echo esc_html($advokat_option['phone-pretext']); endif;?> </span>
<a href="tel:+<?php echo esc_attr(str_replace(" ","",($advokat_option['phone'])))?>"> <?php echo esc_html($advokat_option['phone']); ?></a>
</span>
</li>
<?php } ?>
<?php if(!empty($advokat_option['top-email'])) { ?>
<li class="rs-contact-email">
<i class="glyph-icon flaticon-email"></i>
<span class="contact-inf">
<span><?php if(!empty($advokat_option['email-pretext'])): echo esc_html($advokat_option['email-pretext']); endif;?> </span>
<a href="mailto:<?php echo esc_attr($advokat_option['top-email'])?>"><?php echo esc_html($advokat_option['top-email'])?></a>
</span>
</li>
<?php } ?>
<?php if(!empty($advokat_option['location-pretext']) || !empty($advokat_option['top-location'])) { ?>
<li class="rs-contact-location">
<i class="fa flaticon-location"></i>
<span class="contact-inf">
<span><?php if(!empty($advokat_option['location-pretext'])): echo esc_html($advokat_option['location-pretext']); endif;?> </span>
<?php echo esc_html($advokat_option['top-location'])?>
</span>
</li>
<?php } ?>
<?php if(!empty($advokat_option['top-opening'])) { ?>
<li class="rs-contact-location">
<i class="fa flaticon-location"></i>
<span class="contact-inf">
<span><?php if(!empty($advokat_option['opening-pretext'])): echo esc_html($advokat_option['opening-pretext']); endif;?> </span>
<?php echo esc_html($advokat_option['top-opening'])?>
</span>
</li>
<?php } ?>
</ul>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
<!-- Header Menu Start -->
<?php
$menu_bg = '';
//check individual header
if(is_page() || is_single()){
$menu_bg = get_post_meta(get_the_ID(), 'menu-type-bg', true);
} elseif(is_home() && !is_front_page() || is_home() && is_front_page()){
$menu_bg= get_post_meta(get_queried_object_id(), 'menu-type-bg', true);
}
$menu_bg_color = !empty($menu_bg) ? 'style=background:'.$menu_bg.'' : '';
?>
<div class="menu-area" <?php echo wp_kses_post($menu_bg_color);?>>
<div class="<?php echo esc_attr($header_width);?>">
<div class="menu_one">
<div class="row-table">
<div class="col-cell menu-responsive">
<?php
if( is_page_template( 'page-single.php' ) ) {
get_template_part('inc/header/menu-single');
}else{
get_template_part('inc/header/menu');
}
?>
</div>
<?php
if(!empty($advokat_option['quote'])):
$quote_menu = $advokat_option['quote'];
endif;
?>
<div class="col-cell header-quote">
<?php
//include Cart here
if($rs_show_cart != 'hide'){
if(!empty($advokat_option['wc_cart_icon']) || ($rs_show_cart == 'show') ) {
get_template_part('inc/header/cart');
}
}
?>
<?php
if($rs_top_search != 'hide'):
if(!empty($advokat_option['off_search']) || ($rs_top_search == 'show') ): ?>
<div class="sidebarmenu-search">
<?php
//include sticky search here
get_template_part('inc/header/search');
?>
</div>
<?php endif;
endif; ?>
<?php
if($rs_offcanvas != 'hide'):
if(!empty($advokat_option['off_canvas']) || ($rs_offcanvas == 'show') ): ?>
<div class="sidebarmenu-area text-right">
<?php
//off convas here
get_template_part('inc/header/off-canvas');
?>
</div>
<?php endif; endif; ?>
<?php
if($rs_show_quote != 'hide'){
if(!empty($advokat_option['quote'])){?>
<div class="btn_quote"><a href="<?php echo esc_url($advokat_option['quote_link']); ?>" class="quote-button"><?php echo esc_html($advokat_option['quote']); ?></a></div>
<?php } } ?>
</div>
</div>
</div>
</div>
</div>
<!-- Header Menu End -->
</div>
<?php
get_template_part( 'inc/breadcrumbs' );
?>
<!-- Slider Start Here -->
<?php get_template_part('inc/header/slider/slider'); ?>
</header>