• Hi,
    I’m developing a theme – & while running through the www.remarpro.com test data, my theme
    doesn’t correctly handle the embedded videos etc. (it simply echoes the url from content).
    Is there something I’m missing – I’ve been looking through twenty-twenty-one code and can’t find what is different. Expected this to work out of the box as I’m not knowingly changing anything related to this.
    many thanks
    K

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator bcworkz

    (@bcworkz)

    Naked media URLs to resources from the likes of YouTube, etc. get embedded by the oEmbed process. This is built into WP core and should be independent of themes.

    Does the twenty twenty-one theme have trouble with the same data?

    Try embedding a link to a YT video using a valid link of your choice on a new post. Same problem or no?

    Thread Starter kevinjapan

    (@kevinjapan)

    hi
    twenty twenty-one displays it correctly, so I must be breaking something –
    just not sure what it could be.
    I tried embedding a youtube link in a new post as you suggested – and my theme displays it fine – -may throw some light on it; will investigate further
    so I don’t appear to be breaking the WP core functionality – but the testing scaffolding is tripping me up perhaps?
    thanks for insights, will keep at it

    Moderator bcworkz

    (@bcworkz)

    Any particular video in the test data, or all of them? There are a number of different embed approaches, for example: oEmbed, <video> tag, <iframe> player.

    Did you start your theme from scratch? Or is it based on a starter theme of some sort? If a starter theme, which one?

    Thread Starter kevinjapan

    (@kevinjapan)

    hi,

    the following test posts fail in my theme:

    – post-format-video-wordpresstv (fails also in ‘twenty twenty’ theme)
    – post-format-video-youtube
    – blocks-embeds

    videos on ‘block-cover’ test post are fine

    theme was started from scratch – though i have borrowed some code latterly from twenty twenty-one.
    thnx

    Moderator bcworkz

    (@bcworkz)

    The one that fails in twenty twenty probably isn’t anything to be concerned about. Something may be wonky with WordPress TV’s oembed server. The YT video format post is also oEmbed, which seems to be working with URLs outside the test data, so it’s odd to fail in the data. Try placing the same YT URL in a new post. If it works there, maybe there’s something queer about the test data.

    The blocks embeds are also essentially oEmbeds, one from YT, the other from VideoPress. The cover video is a straight .mov file sideload.

    I’m having trouble imagining any way a difference in theme would alter the oEmbed process. Unless you’ve added content filtering of some sort.

    Thread Starter kevinjapan

    (@kevinjapan)

    Hi,
    first of all, thanks for the input – it’s been a great help.

    fyi:
    I tried both the YT video and twitter embed in a new post – and they both engaged the oembed fine in the editor and my theme then successfully displays them in the front-end. SO, I don’t think I filter the content or break the mechanism in any way.
    I did consider content filtering – but I don’t do that in this theme – of course, I double checked it.

    I will have one more look at this; if no success, will submit my theme with a note explaining the tests I have done – again thanks for your ideas on this.
    K

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Enabling Embeds in new theme’ is closed to new replies.