Header
Header
DOCTYPE html>
<html lang="en">
<head>
<?php
// 判断当前页面类型
if ( is_front_page() ) {
// 首页
$title = get_bloginfo( 'name' );
} elseif ( is_single() ) {
// 文章页
$post = get_post();
$title = $post? $post->post_title : '';
} elseif ( is_page() ) {
// 页面页
$post = get_post();
$title = $post? $post->post_title : '';
} elseif ( is_category() ) {
// 分类页
$cat = get_queried_object();
$title = $cat? $cat->name : '';
} elseif ( is_tag() ) {
// 标签页
$tag = get_queried_object();
$title = $tag? $tag->name : '';
} else {
// 其他情况,设置一个默认标题
$title = get_bloginfo( 'name' );
}
// 要添加的固定文本
$appendText = "- Lifting Slings | Webbing Slings | Single Use One Way Slings |
Round Slings | Ratchet Tie Down Straps | Rigging Slings | Crane Slings | China
Wristrong Industry Manufacturing";
// 正确拼接
$description = $title. ' '. $appendText;
?>
<meta name="description" content="<?php echo esc_attr( $description );?>">
<?php
// 获取当前页面的 HTML 内容
$html = file_get_contents('php://input');
// 创建 DOM 文档对象
$dom = new DOMDocument();
@$dom->loadHTML($html);
// 获取所有标签元素
$elements = $dom->getElementsByTagName('*');
// 存储标签名的数组
$tagNames = [];
foreach ($elements as $element) {
$tagName = $element->tagName;
if (!in_array($tagName, $tagNames)) {
$tagNames[] = $tagName;
}
}
// 将标签名组成关键字字符串
$keywords = implode(',', $tagNames);
<!-- Event snippet for 网页浏览 conversion page --> <script> gtag('event',
'conversion', {'send_to': 'AW-1000317438/D4SuCKHMuaoCEP7D_twD'}); </script>
<!--[if lt IE 9]>
<script type="text/javascript" src="/starct/js/html5shiv.min.js"></script>
<script type="text/javascript" src="/starct/js/respond.min.js"></script>
<![endif]-->
<!--[if lt IE 9]>
<style type="text/css">
.ie6div{position: fixed; z-index: 1000; width: 100%; height: 100%; top: 0; left: 0;
overflow: hidden; background-color: #fff; filter: Alpha(opacity=90);
color:#ff0000; text-align:center; }
.ie6div span{color:#ff0000;}
.ie6div a{text-decoration:underline;}
*html{ background: url(/https/www.scribd.com/starct/images/8c5176cae46a4368b09fb837209875f3.gif)
fixed; }
*html body { margin: 0; height: 100%; }
*html .ie6div{ position: absolute; left: expression(documentElement.scrollLeft +
documentElement.clientWidth - this.offsetWidth); top:
expression(documentElement.scrollTop + documentElement.clientHeight -
this.offsetHeight); }
</style>
<div class="ie6div">
<h1 style="padding-top:100px; padding-bottom:50px; font-size:42px;">Website
Warning!</h1>
<p style="font-size:24px; color:#000000;">Dear users, your browser version is too
low, affecting the page display!<br/><span>It is recommended to <a
href="https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads"
target="_blank">upgrade now!</a></span> If you use IE, please upgrade to IE9 or
higher at least, or use Chrome (Google), FireFox and other browsers to browse the
website!</p></div>
<![endif]-->
</head>
<body>
<!--PC site navigation start-->
<?php $aaaa = get_fields(154); ?>
<div class="headtop">
<div class="logodiv"><a href="/" title="Return Home"><img src="<?php echo
$aaaa["logo"] ?>" alt="<?php echo $aaaa["gsmc"] ?>"></a></div>
<div class="container">
<div class="toplayer">
<p>
<img src="/starct/img/icon-iso-s.png" alt="ISO
certification">
<img src="/starct/img/icon-gs-s.png" alt="GS
certification">
<img src="/starct/img/icon-ce-s.png" alt="CE
certification">
<img src="/starct/img/icon-reach.png" alt="Reach
certification">
<img src="/starct/img/icon-safety-harness-
certification.png" alt="Safty Harness certification">
<img src="/starct/img/icon-sgs-tested.png" alt="SGS
certification">
<img src="/starct/img/icon-gs.png" alt="GS certification">
<span>Email: <?php echo $aaaa["yx"] ?></span>
</p>
</div>
<div class="navdiv">
<ul id="nav">
<li><a href="/">Home</a></li>
</ul>
<div class="searchdiv">
<?php $cpmc =
get_categories('parent=2&hide_empty=0&orderby=id&order=ASC');
foreach($cpmc as $category){ ?>
<li class="m-list"><a href="<?php echo get_category_link($category->term_id) ?>"><?
php echo
$category->name ?></a></li>
<?php } ?>
</ul>
<li class="m-linkline"><a href="<?php $catt = get_category(6);
echo get_category_link($catt->term_id) ?>"><?php echo $catt->name ?></a><i
class='m-more'></i></li>
<ul class='m-sublistbox'>
</ul>
<li class="m-linkline"><a href="<?php $catt = get_category(13);
echo get_category_link($catt->term_id) ?>"><?php echo $catt->name ?></a><i
class='m-more'></i></li>
<?php $cpmc =
get_categories('parent=14&hide_empty=0&orderby=id&order=ASC');
foreach($cpmc as $category){ ?>
<li class="m-list"><a href="<?php echo get_category_link($category->term_id) ?>"><?
php echo
$category->name ?></a></li>
<?php } ?>
</ul>
<li class="m-linkline"><a href="<?php $catt = get_category(18);
echo get_category_link($catt->term_id) ?>"><?php echo $catt->name ?></a><i
class='m-more'></i></li>
</ul>
</div>
</div>
<script type="text/javascript" src="/starct/js/navigation.js" charset="utf-
8"></script>