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.

Responsive youtube videos

  • Creator
    Topic
  • #10473
    tompickle
    Participant

    Hey Jason,

    I’ve just finished updating my site to the latest version of Alyeska… awesome updates, thanks for all your hard work!

    I have another question though: Is there any way to make embedded youtube videos responsive within the theme? Have you included such functionality with the new updates and I just don’t know how to harness it?

    Thanks,

    Tom

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

    Hello Tom,

    If you’re included a YouTube video through WordPress’s standard oembed, this should happen automatically. You should be able to do this by simply placing the URL to the YouTube video page in your post or page.

    See here: http://codex.wordpress.org/Embeds

    Is this not working?

    #10482
    tompickle
    Participant

    Holy crap, I had no idea this functionality existed, this is awesome! Thanks for cluing me in… it works great if I just paste the link instead of embedding it like I had been πŸ™‚

    Thanks,

    Tom

    #10483
    tompickle
    Participant

    Hey Jason, one issue I noticed… if I paste a video link inside a toggle shortcode tag, it doesn’t work at all, just the link is shown. Any ideas how to fix this or do I just need to use regular embed inside toggle tags?

    Thanks,

    Tom

    #10501
    Jason Bobich
    Keymaster

    Yeah, try just using the [embed] shortcode. That should still get our theme’s responsive wrappers put around it, I believe.

    [embed]http://youtube.com?watch=xxxx[/embed]

    #12726
    joejacobson
    Member

    None of my videos are responsive. I have one in a tabs shortcode and the rest in the main content area. I have tried your [embed] shortcode above, and also suggestions from WordPress using their shortcode [youtube=http://www.youtube.com/watch?v=JaNH56Vpg-A&w=640&h=385].

    I am using Jetpack.

    Any further suggestions?

    #12727
    joejacobson
    Member

    Forgot to give you my URL: http://globalwrapgirls.com/

    #12735
    Jason Bobich
    Keymaster

    The reason this happens is because of JetPack’s Shortcode Embeds module. They basically abandon WordPress’s default oEmbed functionality for embedding YouTube videos. So, there’s no way for the theme’s responsive wrapper to get in there because JetPack is now embedding the YouTube video.

    A quick fix is just to disable the Shortcode Embeds module from your JetPack options page. When on your JetPack options page, click the “Learn More” button beneath Shortcode Embeds, and then click the “Deactivate” button.

    If this doesn’t work for you, and you need the other embed shortcodes JetPack provides, adding this to your child theme’s functions.php should also do the trick:

    remove_action( 'init', 'wpcom_youtube_embed_crazy_url_init' );
    #12740
    joejacobson
    Member

    Okay, I deactivated the Jetpack’s shortcode and the video now resizes. However, at the end of the video are shown “rel” videos. Here’s what I tried to add, but it doesn’t work: [embed]http://www.youtube.com/watch?v=oyw2ueVYL3o rel=”0″[/embed] Also tried it this way: [embed]http://www.youtube.com/watch?v=oyw2ueVYL3o&rel=0[/embed] and also simply by adding it this way: http://www.youtube.com/watch?v=oyw2ueVYL3o&rel=0

    Is there a reference you can point me to for the correct parameter syntax? I went to WordPress, but they give the info assuming you’re using Jetpack’s shortcode.

    Thanks.

    #12747
    Jason Bobich
    Keymaster

    However, at the end of the video are shown β€œrel” videos.

    Install this plugin, and it’ll filter the parameter in automatically when WordPress embeds any YouTube video:

    http://wordpress.org/plugins/hide-youtube-related-videos/

    #12755
    joejacobson
    Member

    Thanks, Jason.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.