File "header.php"
Full Path: /www/wwwroot/shphe-en.com/wp-content/themes/原global/header.php
File size: 5.01 KB
MIME-type: --
Charset: utf-8
<?php $get_lang = isset($wp_query->query_vars['prisna_translate_seo_request'])?urldecode($wp_query->query_vars['prisna_translate_seo_request']):''; ?>
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="//cdn.globalso.com/cookie_consent_banner.js"></script>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-K6KN8ZB');</script>
<!-- End Google Tag Manager -->
<title>
<?php wp_title( ' ', true, 'right' ); ?>
</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<link rel="apple-touch-icon-precomposed" href="">
<link rel="alternate" hreflang="en" href="<?php echo curPageURL();?>" />
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<?php if ( is_singular() ) : ?>
<meta property="og:url" content="<?php echo curPageURL();?>"/>
<meta property="og:title" content="<?php wp_title(); ?>"/>
<meta property="og:description" content="<?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 300,"..."); ?>"/>
<meta property="og:type" content="product"/>
<?php $images = get_field('product_gallery');
if( $images ): foreach( $images as $key=>$image ):
if(!is_array($images[$key])){
$eric_id = $image;
$eric_urcs = wp_get_attachment_image_src($eric_id, $size='full');
$eric_urc = $eric_urcs[0];
$image = array(
'id' => $eric_id,
'url' => $eric_urc,
'sizes' => array('thumbnail' => $eric_urc, )
);
$images[$key] = $image;
}
if (!$image['sizes']['thumbnail']) $image['sizes']['thumbnail'] = $srcs[0]; endforeach; endif; ?>
<?php if( $images ): for($x=0;$x<1; $x++){ ?>
<meta property="og:image" content="<?php echo $images[0]['url']; ?>"/>
<?php } endif; ?>
<meta property="og:site_name" content="https://www.shphe-en.com/"/>
<?php endif; ?>
<link href="https://www.shphe-en.com/style/global/style.css" rel="stylesheet">
<link href="//cdn.goodao.net/shphe-en/style/public/public.css" rel="stylesheet">
<?php get_the_field('3code_gw'); ?>
<link rel="shortcut icon" href="<?php $image = get_get_field('ad_favicon');if( !empty($image) ): ?><?php echo $image['url']; ?><?php endif; ?>" />
<?php wp_head();?>
<?php if( is_category() ) : ?>
<meta name="description" content="<?php wp_title(); ?> Manufacturers, Factory, Suppliers From China, <?php echo do_shortcode( '[rand_suffix]' ); ?>" />
<?php elseif( is_tag() ) : ?>
<meta name="description" content="<?php wp_title(); ?> Manufacturers, Factory, Suppliers From China, <?php echo do_shortcode( '[rand_suffix]' ); ?>" />
<?php endif; ?>
<meta name="facebook-domain-verification" content="1sebew9v82bd8sgxz83u0wbc0vlka8" />
<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '696895949232739');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=696895949232739&ev=PageView&noscript=1"
/></noscript>
<!-- End Meta Pixel Code -->
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K6KN8ZB"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div class="container">
<header class="<?php if(is_home()) : ?>index_web_head<?php else: ?><?php endif; ?> web_head">
<div class="head_layer">
<div class="layout">
<figure class="logo"><a href="https://www.shphe-en.com/">
<?php $image = get_get_field('ad_logo');if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['title']; ?>">
<?php endif; ?>
</a></figure>
<nav class="nav_wrap">
<ul class="head_nav">
<?php
$menu=str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('menu' => 31, 'echo' => false)) ));
$menu=str_replace("http://home", home_url("/"),$menu);
echo $menu
?>
</ul>
</nav>
<div class="head_right">
<b id="btn-search" class="btn--search"></b>
<?php get_sidebar(language);?>
</div>
<i class="head_left_bg"></i>
<i class="head_right_bg"></i>
</div>
</div>
</header>