Skip to main content
Documentation/Elements Reference/Other/oEmbed
Elements Reference

oEmbed

The OEmbed element embeds content from other sites by URL — paste a link to a YouTube
video, a Vimeo video, or anything else WordPress can embed, and the provider's player or
card is rendered on your page.

It starts with a YouTube video already embedded so you can see it working.

Content

The OEmbed element's Content tab
The OEmbed element's Content tab

Content URL is the only content control: the address of the thing to embed.
WordPress looks up the URL's oEmbed provider and returns the embed markup — if no
provider matches, the element shows "No oEmbed provider found for the provided URL."
instead. Hover the field for the dynamic data button to feed the URL from a custom
field.

The Design tab

OEmbed has its own Design tab (the palette icon) with one section:

  • Force Iframe Aspect Ratio — on by default, with Width 16 and Height 9.
    Provider iframes come with fixed pixel sizes; this setting instead stretches the
    iframe to fill the element's width and locks it to the given aspect ratio, so the
    embed scales cleanly with your layout. Turn it off to keep the provider's own
    dimensions.

On the front end

The element renders a wrapper (a div by default — the tag control offers section,
figure, article, and other semantic tags) with a generated per-element class and
the oxy-oembed class, containing whatever markup the provider returns — typically an
iframe.

  • HTML5 Video — for self-hosted video files
    played with the browser's native player.