If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
July 18, 2011 at 11:48 am #5075
is it possible changing the preview image on the overview page to a youtube video preview? (from the url inserted in the backend on the “new article” site). So basically, removing the existing hover image, making a clickable lightbox which displays the video then. Is there a way to access this youtube url from the overview site?
Thanks in advance,
JakobJuly 19, 2011 at 5:51 am #48762
at the moment it’s only possible to add youtube videos to single entries ( “Full Size Pic or Video for Lightbox” field ). Implementing a lightbox on the gallery view would destroy the big preview thumb hover effect and requires some work.July 19, 2011 at 8:31 am #48763
I don’t care about the big preview thumb with the hover effect actually. The question is if it is possible to implement lightbox there and be able to access the youtube link from the backend from every product at the overview site? Would be great if you can give me hints on which files I have to modify.July 20, 2011 at 1:24 am #48764
so if I get it right you want to remove the big hover image .. you’d want to make the images clickable and they’d open a lightbox with a youtube video? Well yes it’s possible but it wasn’t made to do this at all, I believe you’d have to modify quite a lot, including some core elements of the gallery script itself.July 21, 2011 at 12:26 pm #48765
sorry for the lack of clarity. Basically, I want to insert a youtube video there – no lightbox – thats all. I just need to know how to access the appropriate youtube link from the backend and then which file I have to modify for. Thanks for helping out so far! :)July 25, 2011 at 7:37 pm #48766July 26, 2011 at 6:12 am #48767
Click on the “upload” button (in the “add featured media” section), then instead of “From Computer” choose “From Url” and enter your youtube/vimeo link in the url field. Then click on “Insert into Post”. That’s it :)July 26, 2011 at 8:22 am #48768July 26, 2011 at 8:57 am #48769
Sorry – I should have read my first post. You’re using Expose which doesn’t support Youtube. It requires some custom code to implement it which is beyond the scope of this support forum. Only newer themes like Habitat+ support embedded videos in the portfolios. To be honest I don’t think we’ll implement this feature in expose.July 26, 2011 at 9:54 am #48770
Just tell me which files I have to modify for. Im able to play with php a bit. Crystal clear that you are not able to implement that for one person afterwards. Thanks!July 26, 2011 at 10:28 am #48771
Hard to say because it depends on the approach you take. You can modify the thumb generation function in frameworkhelper_functions/kriesi_post_thumb.php or you can implement a the youtube code in single.php, index.php, etc. Basically you’d need to replace all occurences of kriesi_post_thumb() function with your custom code which checks for videos first and adjusts the output accordingly.July 26, 2011 at 12:41 pm #48772
Alright, thanks a lot, solved it.
For other guys: Modify the index.php and archive.php files:
$tubor = str_replace("watch?v=", "embed/", get_post_meta($post->ID, "_preview_big", true));
/*echo "< a href='".$imagelink."'>";
if($featured == 'yes') echo "<span class='featured_entry'></span>";
and add this directly below:
echo "<iframe width="180" height="132" src="" . $tubor . "" frameborder="0"></iframe>";July 28, 2011 at 6:36 am #48773
The topic ‘Change preview on the home overview page to a youtube video’ is closed to new replies.