【问题标题】:Using multiple items of the same kind in Schema.org JSON-LD [duplicate]在 Schema.org JSON-LD 中使用多个相同类型的项目 [重复]
【发布时间】:2017-07-25 01:08:35
【问题描述】:

我正在尝试使用结构化数据来指定多个组织(见下文)。但谷歌的结构化数据测试工具只识别每种类型的第一项。

如何列出多个alumniOf 项目?

<script type="application/ld+json">
  {
    "@context": "http://schema.org",
    "@type": "Organization",
    "name": "My Org",
    "founder": {
      "@type": "Person",
      "name":"Me",
      "alumniOf":{
        "@type": "Organization",
        "name": "My Org 1"
      },
      "alumniOf":{
        "@type": "Organization",
        "name": "My Org 2"
      }

  }
</script>

【问题讨论】:

标签: seo schema.org json-ld


【解决方案1】:

您可以列出多个 alumniOf 项目,只需像这样放置它们:

<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "Organization",
    "name": "My Org",
    "founder": {
        "@type": "Person",
        "name":"Me",
        "alumniOf": [
            {
                "@type": "Organization",
                "name": "My Org 1"
            },
            {
                "@type": "Organization",
                "name": "My Org 2"
            }
        ]
    }
}
</script>

在这里测试。 https://search.google.com/structured-data/testing-tool

【讨论】:

  • 我今天将验证测试并标记为正确。谢谢!太简单了!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-01-25
  • 2023-03-15
  • 2015-08-10
  • 1970-01-01
  • 1970-01-01
  • 2019-06-24
  • 1970-01-01
相关资源
最近更新 更多