Opened 6 years ago
Closed 3 years ago
#5512 closed enhancement (fixed)
Add VideoObject schema to wordpress.tv video pages
| Reported by: | jonoaldersonwp | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | WordPress.tv | Keywords: | seo |
| Cc: |
Description
Individual video pages, like https://wordpress.tv/2020/10/29/chris-ferdinandi-the-lean-web/, should output structured data which describes the video in the <head> of the template.
This will make the pages eligible for rich(er) results in search engines.
The following example is based on https://wordpress.tv/2020/10/29/chris-ferdinandi-the-lean-web/, and variables should be fairly self-explanatory, with some considerations:
- I've assumed that all videos are assumed to be family-friendly; this may not always be the case.
- The language code can be inferred (and converted to country code, such as
frores) from the video's language categorisation. - When there are multiple speakers, additional
Personnodes should be added to theactorarray. - Missing properties (e.g., in the case of a video without a description) should be omitted.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "VideoObject",
"name": "Chris Ferdinandi: The Lean Web",
"url": "https://wordpress.tv/2020/10/29/chris-ferdinandi-the-lean-web/",
"contentUrl": [
"https://videos.files.wordpress.com/rFicEAZ7/video-40c6f679f8_std.mp4",
"https://videos.files.wordpress.com/rFicEAZ7/video-40c6f679f8_dvd.mp4",
"https://videos.files.wordpress.com/rFicEAZ7/video-40c6f679f8_hd.mp4",
"https://videos.files.wordpress.com/rFicEAZ7/video-40c6f679f8_fmt1.ogv"
],
"description": "The web in 2020 is a bloated and over-engineered mess! Many modern web development “best practices” are making the web worse. This thought-provoking talk shares ideas on how to fix the problem as it explores an alternate set of best practices.",
"duration": "P0DT0H49M43S",
"height": 640,
"inLanguage": "en",
"isFamilyFriendly": true,
"thumbnailUrl": "https://videos.files.wordpress.com/rFicEAZ7/video-40c6f679f8_scruberthumbnail_0.jpg",
"uploadDate": "2020-10-29",
"width": 634
}
]
}
</script>
Note that this is the first step in establishing a much richer schema ecosystem on this site, and multiple tickets will follow as we enrich and extend these data structures (as well as adding them to other page types).
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 10463: