Show YouTube video thumbnail from post in results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Show YouTube video thumbnail from post in results

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14613
    kabukistrength
    kabukistrength
    Participant

    I have the filter setup on this page:

    https://kabukistrength.com/kms-library/

    (login using admin credentials provided above to access it)

    As you can see, the post type I am using is “video” and shows a previous thumbnail of the video in the post. I would like to be able to include this thumbnail in the search results…is this possible?

    #14619
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Thank you for the details, I’ve looked up the issue via the back-end.

    The problem is, that those thumbnails are not actually images, but the videos itself – therefore the plugin is not able to find any related image. However, the video link is stored within the ‘qodef_post_video_link_meta’ custom field, and it might be possible to link to the original youtube thumbnail based on the video key.

    I’ve put together a custom code, that parses the video key based on the youtube URL, and links to the youtube thumbnail. Place it to the functions.php file in your theme/child theme directory (only copy from line 3):

    IMPORTANT: Make sure to have a full site back-up before you make direct changes in your theme files. Also, I highly recommend using an FTP client to make the changes. The built in WordPress file editor will malfunction if a syntax error is found in the code.

    Le me know if you need help with this.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

You must be logged in to reply to this topic.