在多个元素上使用 itemprop="articleBody" (schema.org)

rea*_*lph 5 structured-data microdata schema.org

itemprop="articleBody"在多个元素上使用是不好的做法。我问是因为我的页面是这样的:

<main class="post content">
  <article itemscope itemType="http://schema.org/BlogPosting">
    <header>
      <h1 itemprop="headline">My Blog Headline</h1>
      <p><time class="dt-published" itemprop="datePublished" pubdate datetime="2015-01-24 19:08:00">Jan 24, 2015</time></p>
      <p itemprop="author">Published by <a class="p-author h-card" itemprop="name" href="http://author.co.uk">Author Name</a></p>
    </header>

    <section itemprop="articleBody">
      <p>Article body</p>
      <p>Article body</p>
    </section>

    <section class="gallery">
      ...
    </section>

    <section itemprop="articleBody">
      <p>Article body</p>
      <p>Article body</p>
    </section>

  </article>
</main>
Run Code Online (Sandbox Code Playgroud)

我的文章正文之间有一个画廊,可以像上面一样itemprop="articleBody"在多个sections 上使用吗?

PSdisplay: none在我的上使用也是不好的做法itemprop="author"吗?我不希望它成为页面设计的一部分,还有其他方法吗?

Éri*_*ric 0

1)至于你的主要问题,我也处于同样的情况,我找不到证据表明这是一种不好的做法。Google结构化数据测试工具不会拒绝多重articleBody标记;这不是有效性的证明,而是一条线索。


2)至于你关于隐藏作者姓名的PS问题,你可以替换这一行:

<p itemprop="author">Published by <a class="p-author h-card" itemprop="name" href="http://author.co.uk">Author Name</a></p>
Run Code Online (Sandbox Code Playgroud)

用这些行:

<div itemprop="author" itemscope itemtype="http://schema.org/Person">
  <meta itemprop="name" content="Author Name" />
</div>
Run Code Online (Sandbox Code Playgroud)

顺便说一句,上面几行还说明了authoris aPerson而不是 a Thing