为 WordPress 添加 JSON-LD 格式的结构化数据

Posted in:
Update time:2019-05-15

We offer WordPress Themes and Plugins Custom Development Services

This site has long undertaken WordPress themes, plugins, WooCommerce-based store mall development business. We have 10 years of experience in WordPress development, if you want to Developing Websites with WordPress, please contact WeChat: iwillhappy1314 or email: amos@wpcio.com for inquiries.

2 thoughts on “为 WordPress 添加 JSON-LD 格式的结构化数据

  1. WP智库,您好!我看到有个台湾的SEO网站,他的文章页并没有显示星标,但谷歌搜索结果有显示结构化数据。

    看了他的html代码,发现是用JS实现的:

    {
      "@context": "https://schema.org/",
      "@type": "Review",
      "itemReviewed": {
        "@type": "Thing",
        "name": "WebPage"
      },
      "author": {
        "@type": "Person",
        "name": "Whoops SEO"
      },
      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "100",
        "bestRating": "100"
      },
      "publisher": {
        "@type": "Organization",
        "name": "Whoops SEO"
      }
    }

    按照您“通过代码为WordPress添加JSON-LD格式的结构化数据”,测试添加了,但是提示出现PHP错误……

    请问如何添加以下评分格式化数据呢?

      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "100",
        "bestRating": "100"
      },
    1. 这就是 JSON-LD 格式的数据,JSON-LD 格式的数据并不一定要求在网页中显示的,你可以通过 PHP 直接把这个数据添加到网页的 Head 部分。

发表回复

Your email address will not be published. 必填项已用 * 标注

*