Skip to content

Video Popup Block: Add Video Schema output #3402

@bfintal

Description

@bfintal

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions