header.php
5.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?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>
<title>
<?php wp_title( ' ', true, 'right' ); ?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<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="">
<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="<?php echo home_url("/"); ?>"/>
<?php endif; ?>
<link href="<?php echo home_url("/"); ?>style/global/style.css" rel="stylesheet">
<link href="<?php echo home_url("/"); ?>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; ?>
</head>
<body>
<section class="container">
<!-- head-wrapper start -->
<header class="head-wrapper">
<nav class="topbar">
<section class="layout">
<div class="head-contact">
<div class="head-phone"><span data-txt="Phone"><b>
<?php get_the_field('lianxi_phone_01'); ?>
</b></span><a href="tel:<?php get_the_field('lianxi_phone_01'); ?>"></a></div>
<div class="head-email"><span data-txt="Email"><b><a href="javascript:" class="add_email12">
<?php get_the_field('lianxi_mail_01'); ?>
</a></b></span><a href="javascript:" class="add_email12"></a></div>
</div>
<?php get_sidebar(language);?>
<ul class="head-social">
<?php $images = get_get_field('sns_gallery'); if( $images ): foreach( $images as $image ): ?>
<li><a target="_blank" href="<?php echo $image['alt']; ?>"><img src="<?php echo $image['url']; ?>" alt="<?php echo $image['description']; ?>"></a></li>
<?php endforeach; endif; ?>
</ul>
</section>
</nav>
<section class="header">
<section class="layout">
<div class="logo"><a href="<?php echo home_url("/"); ?>">
<?php $image = get_get_field('ad_logo');if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['title']; ?>">
<?php endif; ?>
</a></div>
<nav class="nav-bar">
<section class="nav-wrap">
<ul class="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);
$menu=str_replace("/news", "".home_url("/")."news" ,$menu);
$menu=str_replace("/video", "".home_url("/")."video" ,$menu);
echo $menu
?>
</ul>
</section>
<section class="head-search-wrap"> <b class="head-search-ico"></b>
<section class="head-search-bg">
<div class="head-search">
<form class="pro-search" action="/index.php" method="get">
<input class="search-ipt" type="text" value="Enter Keywords..." name="s" id="s" />
<input type="hidden" name="cat" value="490"/>
<input class="search-btn" type="submit" id="searchsubmit" value="" />
</form>
</div>
</section>
</section>
</nav>
</section>
</section>
</header>
<!--// head-wrapper end -->