Is your feature request related to a problem? Please describe.
When using a Video popup block, the video doesn't get index by search engines
Describe the solution you'd like
Automatically include a video schema in the output of the Video popup block.
-
No need for an option, this will always be included in the output.
-
Reference: https://www.semrush.com/blog/video-schema/
-
We can output the same way the Accordion block outputs it's schema (but without the option to enable/disable it, this one is always enabled)
Add a new panel in the Style tab > General for schema (at the bottom, add a ControlSeparator then the schema fields:
- Video name (will be used for the schema
name field, default to blank)
- Video upload date (will be used for the
uploadDate field, default to blank)
The schema output should be generated PHP-side in the render_block function just before outputting and should have the following data:
name - from the name field, or default to the get_the_title() if available, blank otherwise
thumbnailUrl - should be acquired from the image src in the child image block if available, blank otherwise
uploadDate - from the uploadDate field, or default to the publish date of the current post if available, blank otherwise
contentUrl - the video URL
Is your feature request related to a problem? Please describe.
When using a Video popup block, the video doesn't get index by search engines
Describe the solution you'd like
Automatically include a video schema in the output of the Video popup block.
No need for an option, this will always be included in the output.
Reference: https://www.semrush.com/blog/video-schema/
We can output the same way the Accordion block outputs it's schema (but without the option to enable/disable it, this one is always enabled)
Add a new panel in the Style tab > General for schema (at the bottom, add a ControlSeparator then the schema fields:
namefield, default to blank)uploadDatefield, default to blank)The schema output should be generated PHP-side in the
render_blockfunction just before outputting and should have the following data:name- from thenamefield, or default to theget_the_title()if available, blank otherwisethumbnailUrl- should be acquired from the image src in the child image block if available, blank otherwiseuploadDate- from theuploadDatefield, or default to the publish date of the current post if available, blank otherwisecontentUrl- the video URL