This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

How to use WordPress oEmbed to embed video in Layout Builder

  • Creator
    Topic
  • #23231
    bartwindrum
    Participant

    Hi Jason,

    After updating the latest several Akita plugins I went to my site’s speaking page and deleted a section (just text and links). When I refreshed the page the videos are no longer embedded (Safari under OS 10.9.5). Same thing after opening Firefox. I don’t often edit the site but from my perusal of the page code using an editing plugin that colorizes code (thereby highlighting errors) everything looks ok.

    Can you help? Has something somewhere changed about embedding?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #23233
    Jason Bobich
    Keymaster

    Hi,

    Can you show me a link to a page on your site where a video is supposed to be embedded but isn’t?

    #23234
    bartwindrum
    Participant

    Duh! (sorry ’bout that!) http://axiomaction.com/speaking/
    There should be 4 on this page.

    #23241
    Jason Bobich
    Keymaster

    Hm, I’m not sure what would have changed in any update to the theme or plugins. The feature of the video embedding, called oEmbed, is a default feature of WordPress page/post content.

    But I’m fairly certain this feature has never existed (and still doesn’t) in your theme’s version of our framework for the layout builder, which you’re using on that page. But there is a code snippet that customers have passed around that will enable it, which can be copied into your child theme’s functions.php:

    add_filter( 'themeblvd_the_content', array( $GLOBALS['wp_embed'], 'run_shortcode' ), 8 );
    add_filter( 'themeblvd_the_content', array( $GLOBALS['wp_embed'], 'autoembed'), 8 );

    I wonder if you had this code previously, but accidentally put it in the main theme’s functions.php (instead of your child theme’s), and so that got overridden when you updated? Anyway, try adding the above code your child theme’s functions.php, if it’s not already there.

    Also, the video URL needs to be on its own line, like:

    ... Robert's presentation plus his and my audience QA session (available here). 
    
    http://www.youtube.com/watch?v=vfLxfrfpZkc
    • This reply was modified 2 years, 2 months ago by Jason Bobich. Reason: Edited person's last name out of snippet i coped from site
    #23245
    bartwindrum
    Participant

    Thank you! Putting the urls on their own lines (where they evidently were before) worked. Maybe editing the page somehow mucked w/it’s content, eliminating the breaks…

    I added the 2 snipped lines just now anyway. All four vids still now appear and play. Thx again.

    #23249
    Jason Bobich
    Keymaster

    If it was already working after separating the video links onto their own lines, I would suggest not adding that code snippet above, which would suggest you already have it somewhere. It’s not good for that code to be running twice.

Viewing 5 replies - 1 through 5 (of 5 total)

The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.