Embed Video Thumbnail in featured slider

  • jamilla


    Hi Guys,

    When adding a new post with an embedded video, is there way this video (or the first if multiple are in the post) can be used/set as the thumbnail image in the blog list and/or featured slider..

    We occasionally post videos and want them to display in the featured slider, but there’s no thumbnail, and I need to take a screenshot of the video and set as featured image for this to display..

    Ta! Jami


    Kenneth John Odle


    Unfortunately, the method you described is the only way I know to do this. The slider only handles images, not videos, and it doesn’t handle any images from outside URL’s. As far as I know, this is really a jQuery issue, and not a slider issue.

    That said, you can always try replacing the theme’s slider with a slider that will handle video, such as the AntyhingSlider but that would be a fair amount of work.



    Thanks Ken..

    I’ve downloaded the AnythingSlider, and it’s telling me to put this code into the theme files. Do you know where I should put this?

    <?php echo do_shortcode( "[anything_slides]" ); ?>




    Kenneth John Odle


    That’s weird — it’s echoing a shortcode.

    Have you tried just placing the shortcode ([anything_slides]) on a page or post in the Visual Editor where you want the slider? I would try that and see if it works.

    If not, use a Graphene Action Hook Widget Area.


    Syahir Hakim


    Ken, it’s not actually echoing a shortcode. The do_shortcode() function processes the shortcode, replacing it with actual HTML content, so that HTML content is being echoed instead. It’s similar to inserting the shortcode in a post content.



    Interesting. So is the HTML content being shown written within the function?


    Syahir Hakim


    Nope, but it’s defined when that shortcode is defined. Basically, every (valid) shortcode in WordPress has an accompanying function that defines how to process it. The do_shortcode() function simply runs that accompanying function.



    Gosh, talk about things being done “on the fly”.


    Kenneth John Odle


    This is the part I missed:

    telling me to put this code into the theme files

    So this could be accomplished with an action hook, or action hook widget, I presume.

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

  • You must be logged in to reply to this topic.