- TDK全称:标题(Title)、描述(Description)、关键词(Keywords)
- 开启插件会自动将前端网页源代码的TDK(标题、描述、关键词)转码
- 如果关闭了插件TDK转码,前端网页源代码会自动恢复,与没装插件时的一样
【使用方法】
找到要对TDK转码的前端模板文件,将标题、描述、关键词的标签改成以下:
seo标题
<title>{$meta_title}</title>
改成:
<title>{tdk_encode($meta_title)}</title>
seo关键词
<meta name="keywords" content="{$meta_keywords}" />
改成:
<meta name="keywords" content="{tdk_encode($meta_keywords)}" />
seo描述
<meta name="description" content="{$meta_description}" />
改成:
<meta name="description" content="{tdk_encode($meta_description)}" />
站点名称
{SITE_NAME}
改成:
{tdk_encode(SITE_NAME)}
【转码效果】
- 查看网页源代码,显示转码(一般浏览器,右击网页,点击“查看网页源代码”)
【页面效果】
- 浏览器F12查看,也正常显示。
- 查看网页源代码,显示转码(一般浏览器,右击网页,点击“查看网页源代码”)
文档最后更新时间:2022-08-08 07:37:34