Giter Site home page Giter Site logo

Comments (4)

bbertucc avatar bbertucc commented on September 26, 2024

@tosbey1 - I wonder if you can create a new themeScript file that does this? Checkout the video at: http://4pt0.decubing.com/essentials-fellowship/

Basically, any link with the class .single_media_item-item that had a child div .item-play_icon would need to turn into a typical YouTube iFrame, with the video the being whatever is in the href attribute.

So, when you clicked ..

  <a class="single_media_item-item" href="https://www.youtube.com/watch?v=G_xFo6Hifzk" data-fancybox="gallery-" data-caption="Another sample video.">
    <div class="item-image">
      <img class="image-the_image" src="http://4pt0.decubing.com/wp-content/uploads/2017/07/sample_image-blue-700x525.jpg">
    </div>
    <div class="item-play_icon"></div>
  </a>

That element would become..

<iframe class="single_media_item-youtube_embed" width="560" height="315" src="https://www.youtube.com/embed/G_xFo6Hifzk" frameborder="0" allowfullscreen></iframe>

Note: the class on the iframe.

If you can get the basic replacement functions to work, I'll style it.

You can call the script themeYouTubeEmbed.js.

Happy to answer any questions!

from 4pt0-theme.

tosbey1 avatar tosbey1 commented on September 26, 2024

If you'd like I can actually embed the video with wp_oembed_get("link") instead of scripting it.

With this we could just have the iframe instead of switching from the image to the video. I'm not sure if that is what you wanted though.

from 4pt0-theme.

bbertucc avatar bbertucc commented on September 26, 2024

Very cool @tosbey1. Didn't know wp_oembed_get("link") existed. I'll update it in the PHP.

from 4pt0-theme.

bbertucc avatar bbertucc commented on September 26, 2024

@raphaelgang - moved this to Phase 2 for now, since the feature works this is more of a UX enhancement. Feel free to move it back to Phase 1 or Phase 1 - Critical if you think we need it ASAP.

from 4pt0-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.