Invalid mainContentOfPage Fix

Posted in: Newsmag
Post count: 40

Hi,

I noticed that Google Structured Data Tool is saying there’s an “error” with Newsmag’s mainContentOfPage parameter.

After investigation, I saw that schema.org is now using:

schema.org/BlogPosting instead of schema.org/Blog (current Newsmag setup)

So, to fix:

line 80,103,118 in single.php: (I just changed Blog to BlogPosting)

<div class=”td-pb-span8 td-main-content” role=”main” itemprop=”mainContentOfPage” itemscope=”itemscope” itemtype=”<?php echo td_global::$http_or_https?>://schema.org/BlogPosting“>

I also changed “Blog” to “BlogPosting” in lines 18,41,56 of Single_template_1.php

Hope this Helps!

Post count: 9544

Interesting point; in our case we’d rather simply have “NewsArticle” since we don’t use/are not blogs
https://schema.org/NewsArticle

https://schema.org/BlogPosting

NewsArticle and BlogPosting are both a “subset” of article

REF
https://schema.org/Article

Seems like a nice feature would be to have a field in the theme panel to specify this properly (e.g., BlogPosting or NewsArticle); or perhaps turn if off as I have a hunch some “schema.org” plugin might prove useful for some of the extended elements – or even Advanced Custom Fields (ACF) to embed custom elements in posts.

https://schema.org/articleBody
https://schema.org/articleSection
https://schema.org/alternativeHeadline
https://schema.org/copyrightHolder

obviously the overall wrapper of “article” works for now.

But obviously “Blog” alone doesn’t fit either schema!

Post count: 40

Yes, the NewsArticle schema sounds interesting, at least at first. But, the properties for NewsArticle have a lot to do with physical location(https://schema.org/NewsArticle); whereas, BlogPosting seems to fit better for most sites.

More Discussion here:
http://stackoverflow.com/questions/8866021/what-microdata-should-i-use-for-a-blog
http://webmasters.stackexchange.com/questions/46680/using-schema-for-blogging-article-vs-blogposting

Post count: 9544

Right.. In our case we are a 32 year old publishing co, and so our news portals are not blogs by any definition. 🙂

Post count: 1291

Hi,

Thanks for noticing this, we’ll look into it. The Theme Panel selector is a good idea, i will discuss with the team to see if it’s possible to add something like that in a future update.

Thank you!

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.