Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video Popup Block: Add Video Schema output #3402

Open
bfintal opened this issue Jan 23, 2025 · 0 comments
Open

Video Popup Block: Add Video Schema output #3402

bfintal opened this issue Jan 23, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@bfintal
Copy link
Contributor

bfintal commented Jan 23, 2025

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
@bfintal bfintal added the enhancement New feature or request label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants