Yoast Video SEO for WordPress: Schema output
The schema output for our Video SEO plugin builds upon the Yoast SEO schema output, to add additional detail about embedded videos.
For all the post types you've enabled Video SEO for, it will automatically add a videoObject
piece when it encounters a video embed on the page that it recognizes.
Core logic
- Add a
videoObject
piece for each discovered video. - Add a
video
property to theArticle
, containing an array of references-by-ID to eachvideoObject
piece. - Add an
itemList
containing references to each of thevideoObject
pieces, with amainEntityOfPage
property which references theArticle
.
Additional scenarios
On pages which don't have an Article
- Add the
video
property to theWebPage
, instead of to theArticle
. - Adapt the
mainEntityOfPage
property of theitemList
to reference theWebPage
.