Home > CMS Tutorial > WordPress > body text

How to quickly increase Baidu inclusion in WordPress

藏色散人
Release: 2020-05-27 16:52:52
forward
4853 people have browsed it

The following column WordPress Website Building Tutorial will introduce to you how WordPress can quickly increase Baidu inclusion and speed up website content crawling. I hope it will be helpful to friends in need!

How to quickly increase Baidu inclusion in WordPress

Use the links provided by Baidu Webmaster Platform to automatically submit codes, quickly increase Baidu inclusion, and speed up website content crawling.

1. Create a file named "baidu_js_push.php" with the following content (automatically push JS code):

<script>
(function(){
    var bp = document.createElement(&#39;script&#39;);
    var curProtocol = window.location.protocol.split(&#39;:&#39;)[0];
    if (curProtocol === &#39;https&#39;) {
        bp.src = &#39;https://zz.bdstatic.com/linksubmit/push.js&#39;;
    }
    else {
        bp.src = &#39;http://push.zhanzhang.baidu.com/push.js&#39;;
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
Copy after login

2. Upload the baidu_js_push.php file to the website root directory (wordpress root Table of contents).

3. Add the following code to the footer.php file of the theme file to achieve the effect of installing it in one place and covering the entire site.

<?php include_once("baidu_js_push.php") ?>

How to quickly increase Baidu inclusion in WordPress

How to quickly increase Baidu inclusion in WordPress

For more WordPress technical articles, please visit the WordPress column!

The above is the detailed content of How to quickly increase Baidu inclusion in WordPress. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template