Skip to content

Blogger: mainEntityOfPage structured data error

WeaverStever edited this page Jul 12, 2016 · 4 revisions

The mainEntityOfPage field is recommended. Please provide a value if available.

Instructions:

Download your working Blogger template.
Create a new copy for editing.
Open the new copy with a text editor.

New code should appear in two places (within the post includable and the mobile-post includable).

Original code:

              <b:includable id='post' var='post'>
 <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
              <b:includable id='mobile-post' var='post'>
    <div class='post hentry uncustomized-post-template' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>

Finished code:

              <b:includable id='post' var='post'>
<!-- Commented code
   <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
-- End Commented code -->
    <div class='post hentry uncustomized-post-template' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
      <meta itemscope='itemscope' itemprop='mainEntityOfPage'  itemType='https://schema.org/WebPage' expr:itemid='data:post.link' content= 'data:post.link : data:post.url'/>
              <b:includable id='mobile-post' var='post'>
<!-- Commented code
   <div class='post hentry uncustomized-post-template' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> 
End Commented code -->
   <div class='post hentry uncustomized-post-template' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
     <meta expr:itemid='data:post.link' content= 'data:post.link : data:post.url' itemType='https://schema.org/WebPage' itemprop='mainEntityOfPage' itemscope='itemscope'/>
Explanation:
The code adds [WebPage](https://schema.org/WebPage) to the schema because it contains the [mainEntityOfPage](https://schema.org/mainEntityOfPage) property. In turn, the blogPosting's post.link and post.url attributes are associated with the mainEntityOfPage.

Save and upload your new Template and test again with the Structured Data Testing Tool

You can’t perform that action at this time.