首先找到自己移动站点的内容页模版,一般在/templets/模版目录/下面的以article开头的模版文件。强烈建议大家使用专业的网页编辑工具比如Dreamweaver之类,而不是用记事本。 1、添加canonical标签(必选)即添加 对于很多移动站点,可能本身就添加了,如果没添加,那么在模版的之前,如果没改造https,那么需要添加一句 因本站设置了前台页面过滤HTML标签所以 以下代码【】请换成对应的< > 请在页面head标签前添加如下代码 【ink rel="canonical" href="{dede:global.cfg_basehost/}{dede:field name=typedir runphp=yes}@me=str_replace("{cmspath}",'',@me);{/dede:field}/{dede:field.aid/}{dede:field.nowpage runphp='yes'}if (@me!='1') @me='_'.@me.'.html'; else @me=".html";{/dede:field.nowpage}"】 如果你在系统基本设置里,没有设置跟地址那么你需要在href后面加上 http://你的域名 如下 .具体结果需要你加完了看前台页面的源代码。 【ink rel="canonical" href="http://www.你的域名.com{dede:global.cfg_mobile_host/}{dede:field name=typedir runphp=yes}@me=str_replace("{cmspath}",'',@me);{/dede:field}/{dede:field.aid/}{dede:field.nowpage runphp='yes'}if (@me!='1') @me='_'.@me.'.html'; else @me=".html";{/dede:field.nowpage}" /】
如果改造了https,需要把http 换成https 2、添加Json_LD数据 这里通过群友的分享,这里直接有一段织梦的Json_LD代码,将下面这段代码加入到之内,然后将代码出现“您的移动域名” 和 “APPID”(熊掌号后台的)修改为你自己的移动站点域名即可!将“您的主站”,替换成你PC域名即可,是为了调用图片完整地址的。 请在页面head标签前添加如下代码 { "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld", "@id": "http://您的移动域名{dede:field name='arcurl'/}", "appid": "1539897736717695", "title": "{dede:field.title/}", "images": [ "{dede:field.litpic runphp="yes"} @me = (strpos(@me,'defaultpic')? "" : "http://您的主站".@me.""); {/dede:field.litpic}" ], "description": "{dede:field.description function='html2text(@me)'/}", "pubDate": "{dede:field name='senddate' function='strftime("%Y-%m-%dT%H:%M:%S","@me")' /}" } 【script type="application/ld+json"】 { "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld", "@id": "{dede:field.arcurl runphp=yes}@me=str_replace('www.','mip.',@me);@me=str_replace('/mip/','/',@me);{/dede:field.arcurl}", "appid": "{dede:global.cfg_xzhid/}", "title": "{dede:field.title/}", "images": [ "{dede:globle_cfg.basehost/}{dede:field.litpic/}", "{dede:globle_cfg.basehost/}{dede:field.ppic2/}", "{dede:globle_cfg.basehost/}{dede:field.ppic3/}" ], "pubDate": "{dede:field name='pubdate' function='strftime("%Y-%m-%dT%H:%M:%S","@me")' /}" } 【/script】 独立二级域名URL需要简单调整,先把以上代码放进去,然后看下前台的代码效果,根据网站不同在进行相应改变。 织梦改造就是这么简单,改造完成后,记得生成,生成好了到前台页面查看源代码,然后都复制到熊掌号后台进行检验,即可,织梦改造最简单了,只需要加这两段代码就OK了。
文章转抖音,每日一干货关注抖音送:小飞电子书《SEO高手自成》一本 |
Powered by Xzdyy! X3.2
Copyright © 2001 - 2013 Xzdyy Inc.
关于我们 - Archiver - 手机版 - 小黑屋 - 熊掌号第一营 - Design: www.Xzdyy.com