首页 > 解决方案 > 如何删除使用 JSON+LD 的商店软件标准标记?

问题描述

我使用 SW 5.10,如下所示,标准标记(微数据)如下:

<meta itemprop="brand" content="xxxx"/>
<meta itemprop="name" content="xxxx® xxx xxx1.4 Caps (300 xxx)"/>
<meta itemprop="weight" content="0.41 kg"/>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="buybox--inner">

我在 SO 中进行了大量搜索,发现 json+ld 更适合 SEO 和 google,所以我决定使用插件来创建 json+ld,现在如下所示:

<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "xxxx 1.4 Cxxxaps (300 xxx)",
"image": xxxx.jpg",
"mpn": "93331FIT",
"brand": {
"@type": "Thing",
"name": "xxxxx"

现在的主要问题是所有产品都存在微数据和 json ld 结构,这有两个原因,这不是一个好的选择:

1)我在 SO 中搜索并发现一种产品,这对于同时呈现微数据和 json ld 是不好的。

2) json ld 更适合谷歌

因此,我需要将标准 shopware 5 标记(微数据)删除到谷歌搜索控制台,但不能在一页上检测到两个相同的产品,如下所示:

在此处输入图像描述

我如何删除这个购物软件的微数据到谷歌搜索控制台只检测 json ld?

标签: microdatajson-ldgoogle-rich-snippetsshopwaregoogle-search-console

解决方案


您需要覆盖每个包含“旧”语法的模板文件。这几乎是完整的详细信息页面,因为这些丰富的片段直接包含在它们的使用附近。

例如: https ://github.com/shopware/shopware/blob/5.5/themes/Frontend/Bare/frontend/detail/content/header.tpl#L19

我认为通过更改此设置不会对您网站的 seo 性能有任何重大变化。它可能会破坏每个插件模板。


推荐阅读