Home Forums Themes Support Formota Use of thumbnails in video widget?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9599
    victorio404
    Supported

    Hello,

    How can I change the Haru Videos widget to use thumbnails instead of the original image? WP is creating multiple thumbnails when uploading image, why not use them?
    That will be useful if you want to have a nice uniform grid instead of different sized images.

    #9600
    victorio404
    Supported

    I would like the Grid layout to auto-resize the thumbnails so they are same size/aspect ratio

    #9601

    Hi,
    Thanks for contacting us and choosing our product!
    Currently in our theme have 3 video thumbnail style: image, gallery, video and we will use original image size to keeps the ratio.
    If you want to change video thumbnail size you can go to: wp-content/themes/formota/frameworks/includes/theme-functions.php
    Find this function haru_get_video_thumbnail() on line 1092
    You need to change the code from:
    get_the_post_thumbnail_url( $video_id, 'full' )
    to other size you want: https://developer.wordpress.org/reference/functions/get_the_post_thumbnail_url/
    Similar with this code:
    wp_get_attachment_image_src( $thumbnail, 'full' )[0]
    You need to change ‘full’ to another size.
    Hope this helps!

    ****
    Regards,
    HaruTheme

    #9624
    victorio404
    Supported

    Thanks for the guide, but that doesn’t work.
    Please note I want to change the image size on the haru video widget, not the default video archive page.

    #9626

    Hi,
    If you want to change widget display you can go to:
    wp-content/plugins/haru-formota-core/includes/widgets/ then open file haru-widget-formota-videos.php
    You will see this code on line 170:
    echo '<a href="' . esc_url(get_the_permalink()) .'">' . get_the_post_thumbnail( null, 'full', array( 'title' => strip_tags( get_the_title() ) ) ) . '</a>';
    You can change to:
    echo '<a href="' . esc_url(get_the_permalink()) .'">' . get_the_post_thumbnail( null, 'thumbnail', array( 'title' => strip_tags( get_the_title() ) ) ) . '</a>';
    Hope this helps!

    ****
    Regards,
    HaruTheme

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

You must be logged in to reply to this topic.