Schema output for News SEO for WordPress
The schema output for News SEO for WordPress builds upon Yoast SEO for WordPress' base schema output, to provide additional news context and detail.
Core logic
When a post type has been elected as a News Article format, then:
- Change the
@type
attribute of theArticle
to an array ofArticle
andNewsArticle
. - Add a
copyrightYear
property, with the year of publication. - Add a
copyrightHolder
property, which references the publishingOrganization
by ID.
Additional scenarios
Article
On 'news pages' which don't have an In some rare cases, a non-post format (e.g., a page, a custom post type, a homepage, a product page, etc) may be elected as a news type. Typically, these page formats won't contain an Article
.
In these cases, an Article
(and dependent pieces) should be added to the graph and multi-typed into a Article
and NewsArticle
, as if the page were a conventional news post.
In some scenarios, this may result in multiple entities declaring a mainEntityOfPage
relationship with the WebPage
(e.g., when the page already contains a Product
). When this happens, the mainEntityOfPage
property on the conflicting node(s) (e.g., the Product
) should be altered to reference the ID of the NewsArticle
.