Buscando...

Foro » Replacing Thumbnail with Youtube Thumb

This topic has 2 voices, contains 2 replies, and was last updated by  Sumolari 228 días ago.

Viewing 3 posts - 1 through 3 (of 3 total)
Jared

Replacing Thumbnail with Youtube Thumb 5/10/2011 at 2:39 #6056

Im trying to replace the thumbnail in the panel’s with a function that pulls the thumb of the youtube video from the post. I added the function on lines 3910 to 3949 and then replaced the do actions on lines 3984, 3987, 4059, and 4062. This doesn’t output the thumb of the video though so Im wondering what I did wrong. For the record this function works in my regular posts. Thanks for help!

Link to code:

http://pastebin.com/ER5B0HcG

Jared

Reply To: Replacing Thumbnail with Youtube Thumb 6/10/2011 at 14:16 #6099

Ok I feel like Im making some progress…I have this piece of code outputting a thumb from the youtube video but it seems to be grabbing the top post on the page because “get_the_id” isn’t inside a loop. So my question is what can I substitute that with to make it recognize the id?

<a href="" title="">
<img src="" alt="" title="" style="width:; height:;" />

<a href="" title="">
<img src=">" alt="" title="" style="width:; height:;" />

Reply To: Replacing Thumbnail with Youtube Thumb 7/10/2011 at 17:20 #6121

I don’t recommend you modifying wp-carousel.php directly. I would suggest this just if you want to modify prefixes or constants that are declared at the begining of the file.

To achieve what you want I suggest you modifying the theme.

WP Carousel theme API gives you access to each item’s ID (the same ID that WordPress uses to get information about them).

Please, don’t post code directly here because I have some problems with bbPress and posting code (as well as problems with Spam) and I haven’t fixed it yet.

I don’t know how to get the thumbnail of a Youtube video. If you post here the basic code to obtain the thumbnail of a Youtube video given its URL, I think I will be able to post here a modified (and commented) version of Skinless theme that achieve this.

If you are using a custom theme, you can send it to me and I will modify it (and comment the modifications I made).

Viewing 3 posts - 1 through 3 (of 3 total)

This topic has been closed to new replies.