"Blog is not a known valid target type for the mainContentOfPage"
"Blog is not a known valid target type for the mainContentOfPage"
Blog is not a known valid target type for the mainContentOfPage property.
我尝试了很多选项来在 http://www.thecreativedev.com
上设置 mainContentOfPage
属性
我有
<div itemprop="mainContentOfPage" itemscope="itemscope" itemtype="http://schema.org/Blog"> --> This is outside the loop
<div itemscope="itemscope" itemtype="http://schema.org/BlogPosting" itemprop="blogPost"> --> This is in loop
但没有解决方案。我尝试了 Best way to markup "mainContentOfPage"?
上提供的解决方案
任何人都可以帮助我吗?
我怀疑您不想使用 mainContentOfPage
property. It’s not really useful for the average webpage, because it expects a WebPageElement
作为值(代表导航、页脚或侧边栏等内容),而不是 实际上 页面的主要内容(如博客 post)。
如果要表示Blog
is the primary thing the WebPage
is about (e.g., on the blog’s homepage), you might want to use the mainEntity
property (and for the other direction, the inverse property mainEntityOfPage
)。
它可能看起来像这样(使用微数据):
<body itemscope itemtype="http://schema.org/WebPage">
<section itemprop="mainEntity" itemscope itemtype="http://schema.org/Blog">
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting"></article>
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting"></article>
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting"></article>
</section>
</body>
Blog is not a known valid target type for the mainContentOfPage property.
我尝试了很多选项来在 http://www.thecreativedev.com
上设置mainContentOfPage
属性
我有
<div itemprop="mainContentOfPage" itemscope="itemscope" itemtype="http://schema.org/Blog"> --> This is outside the loop
<div itemscope="itemscope" itemtype="http://schema.org/BlogPosting" itemprop="blogPost"> --> This is in loop
但没有解决方案。我尝试了 Best way to markup "mainContentOfPage"?
上提供的解决方案任何人都可以帮助我吗?
我怀疑您不想使用 mainContentOfPage
property. It’s not really useful for the average webpage, because it expects a WebPageElement
作为值(代表导航、页脚或侧边栏等内容),而不是 实际上 页面的主要内容(如博客 post)。
如果要表示Blog
is the primary thing the WebPage
is about (e.g., on the blog’s homepage), you might want to use the mainEntity
property (and for the other direction, the inverse property mainEntityOfPage
)。
它可能看起来像这样(使用微数据):
<body itemscope itemtype="http://schema.org/WebPage">
<section itemprop="mainEntity" itemscope itemtype="http://schema.org/Blog">
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting"></article>
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting"></article>
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting"></article>
</section>
</body>