Comments (4)
@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.
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.
Very cool @tosbey1. Didn't know wp_oembed_get("link")
existed. I'll update it in the PHP.
from 4pt0-theme.
@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)
- Turn off the appearing of the mosaic on the homepage HOT 1
- Loading on mobile is slow HOT 2
- Upload via spreadsheet for Ventures/Users
- Ventures/User Pages
- Subscriber button showing on Community page HOT 1
- User/Ventures Distinction HOT 1
- Remove Tiny/Launch Alum filters from showing HOT 1
- Segments Enhancements and Bugs
- Refine UX HOT 1
- multiple pages include wpengine in address bar HOT 4
- add newsletter signup embed to homepage under mosaic HOT 1
- Venture pages not showing up HOT 1
- make social buttons in footer open in new tab HOT 1
- Page Speed HOT 3
- Update Title Field to Populate ListingID
- Add event labels to event
- Mobile Updates HOT 3
- New Cities for drop down menu HOT 1
- Community Page not fully loading HOT 3
- Raphael's Ideas for Future Iterations of the Site
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 4pt0-theme.