" tag The ID declaration code of the mobile phone can complete the connection."/> " tag The ID declaration code of the mobile phone can complete the connection.">
search
HomeCMS TutorialDEDECMSHow does the dedecms Dreamweaver system connect to Baidu Xiongzhao and add JSON_LD data?

How does the dedecms Dreamweaver system connect to Baidu Xiongzhao and add JSON_LD data?

dedecmsHow does the DreamWeaver system connect to Baidu Xiongzhang Account and add JSON_LD data?

The Baidu Xiongzhao launched by Baidu is very good. My dedecms dream weaving system has been connected early. It can provide original protection for your original articles and evaluate the Xiongzhao search. Index, Xiongzhao search index is obtained by calculating and evaluating the five dimensions of your article's content quality, user preference, originality, active performance, and field focus.

Recommended learning: 梦Weavingcms

After your dedecms dreamweaving website opens the Xiongzhao account, you need to add JSON_LD data docking, otherwise the Baidu Xiongzhao account is If it is unable to detect your website and evaluate your website’s Xiongzhao search index, let’s learn about it below.

Note: All the following content is added to the article_article.htm article template page of the dedecms dream weaving system. There is no need to add it to the home page or article list page.

Step 1: Add the canonical tag

The content of href is required to be the PC page address corresponding to the MIP page or H5 page; if there is no PC page, fill in the current mobile page address, in Introduced within the

tag.
//原来的
<link rel="canonical" href="http(s)://xxx"/>
 
//改成织梦里面的获取当前页链接
<link rel="canonical" href="{dede:global.cfg_basehost/}{dede:field name=&#39;arcurl&#39;/}"/>

Step 2: Add JSON_LD data

The code below is a JSON-LD example. There is an introduction to the field meanings in Xiongzhaohao. Please read it carefully:

<script type="application/ld+json">
{
 "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
 "@id": "https://ziyuan.baidu.com/college/articleinfo?id=1464",
 "appid": "1582779876867159",
 "title": "百度移动搜索落地页体验白皮书——广告篇2.0",
 "images": [
  "https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/bd_logo1_31bdc765.png",
  "https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo_top_ca79a146.png",
  "https://m.baidu.com/static/index/plus/plus_logo.png"
  ],

"description ": "High-quality and reasonable advertisements are widely liked by users as a supplement to information. In early 2017, Baidu User Experience Department conducted a satisfaction survey on users and found that many malicious and low-quality advertisements seriously damaged users' search experience.",

 "pubDate": "2017-06-15T08:00:01"
}
</script>

Change the above part to our dedecms dream weaving system. It is fixed and absolutely suitable for your website. Don’t worry.

<script type="application/ld+json">
{
 "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
 "@id": "{dede:global.cfg_basehost/}{dede:field name=&#39;arcurl&#39;/}",
 "appid": "1582779876867159",
 "title": "{dede:field.title/}",
 "images": [
    "{dede:field.litpic /}"  //获取文章第一张图片
  ],
 "description": "{dede:field.description function=&#39;html2text(@me)&#39;/}",
 "pubDate": "{dede:field.pubdate function="MyDate(&#39;Y-m-dTH:i:s&#39;,@me)"/}"
}
</script>

Step 3: Add Xiongzhanghao ID statement

Add code before the tag on the page

<script src="//msite.baidu.com/sdk/c.js?appid=1582779876867159"></script>

Note: appid is Xiongzhanghao’s unique ID , please do not make any modifications, otherwise it will not be displayed normally.

Step 4: Add the follow function code (strongly recommended). You can add it or not. If you have a separate mobile terminal, you can add it. Adding it to the PC terminal is not suitable

Step 5: Page format verification means that you add the above content to the article_article.htm template page of your dedecms website, and then after updating the website, you need to verify whether your JSON_LD data is really connected. Correct, as shown in the picture.

The above is the detailed content of How does the dedecms Dreamweaver system connect to Baidu Xiongzhao and add JSON_LD data?. For more information, please follow other related articles on the PHP Chinese website!

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft