“Blog is not a known valid target type for the mainContentOfPage”

Blog is not a known valid target type for the mainContentOfPage property.

I have tried many optins to set mainContentOfPage property on http://www.thecreativedev.com

Read More

I have

<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

But no solution worked. I tried solution provided on Best way to markup “mainContentOfPage”?

Anyone can help me in this?

Related posts

1 comment

  1. I suspect that you don’t want to use the mainContentOfPage property. It’s not really useful for the average webpage, because it expects a WebPageElement as value (which represents things like the navigation, the footer or the sidebar), not what is actually the main content of a page (like a blog post).

    If you want to denote that the 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).

    It could look like this (using Microdata):

    <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>
    

Comments are closed.