When a user uploads a video, it is not displayed in the thumbnail in the search. Neither a thumbnail, nor the video is displayed
This is how it looks in the search results: Screenshot by Lightshot
Video is looking fine on the single-detail page: Screenshot by Lightshot
Thank you guys!
1 Like
ihor
December 20, 2022, 7:22am
2
Yes, currently there’s no such option - only images can be used for this purpose, but we’ll check if it’s possible to fetch and generate a thumbnail based on the uploaded video if there are no images uploaded.
Or: Can you provide a snippet so it‘s required of the users to also upload at least 1 photo-file?
andrii
December 21, 2022, 8:28am
5
Hi,
Please try this PHP snippet:
functions.php
<?php
add_filter(
'hivepress/v1/forms/listing_update/errors',
function( $errors, $form ) {
$listing = $form->get_model();
if ( $listing && ! $listing->get_image__id() ) {
$errors[] = 'Please upload at least one image.';
}
This file has been truncated. show original
2 Likes
Hi, Andri, how and where is this snippet supposed to be added?
andrii
December 31, 2022, 10:30am
7
system
Closed
January 30, 2023, 10:31am
8
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.