Vertical photos in carousel galery cause problems

Closed
Travelo - Travel/Tour/Car Rental/Cruise Booking WordPress Theme Travelo - Travel/Tour/Car Rental/Cruise Booking WordPress Theme March 21, 2019
Login to reply
Zdenek Balhar
5 years ago

I have solved it by changing max-height to 600px... thank you

Kelly R Support Agent
5 years ago

Hi,

I understand your request. But I don't know image size of all the images.

As you can see I added following code in /functions.php file.

add_image_size( 'slider-gallery', 750, 500, true );

But some of images are smaller than 750 * 500

So slider is not working well. Please set correct image size in it.

all the image should bigger than it.

For example, if you set like following, 

add_image_size( 'slider-gallery', 300, 400, true );

Then all the images should be larger than 300 * 400

After that, please regenerate thumbnails.

And then please replace /inc/functions/functions.php file in Travelo theme directory with attachement.

Regards, C-Themes

Zdenek Balhar
5 years ago

Hi,

I'm not sure if you understand what I mean. I can't handle 3000 photos and
manually change their size ... I need the gallery to handle photos of any
size. Besides that, I have tried what you have written in the previous
email, regenerated photos in the backend but it was still the same... have
you changed anything? Added other code or you are just saying me to try it
again? The regenerating will last at least 5 hours...maybe more...

Thank you,

Kelly R Support Agent
5 years ago

Hi,

You should use images that are larger than 750 * 500 for slider.

Or you can find following code in /functions.php and set image size in it.

add_image_size( 'slider-gallery', 750, 500, true );

After that please regenerate thumbnails in backend.

Regards, C-Themes

Zdenek Balhar commented privately
Kelly R Support Agent
5 years ago

Hi,

Please give me your website url and admin credentials and ftp information.

Let me check.

Regards, C-Themes

Zdenek Balhar
5 years ago

I have done everything you have written and it doesn't work :/. Any other
idea?
https://chorvatskoumore.cz/

Kelly R Support Agent
5 years ago

Hi,

Travelo theme has not such feature. You should use same size images for slider in Travelo theme.

Or please try to following.

1. Please add following code in bottom of /functions.php file in Travelo theme directory

add_image_size( 'slider-gallery', 1200, 600, true );

You can change 1200 and 600 based on your image size yourself. It is image width and height.

2. Please find following code in /single-accommodation.php file in Travelo theme directory

wp_get_attachment_image( $gallery_img, 'full' )

And replace with following.

wp_get_attachment_image( $gallery_img, 'slider-gallery' )

3. Find following code in /inc/functions/functions.php file in Travelo theme directory

$src = wp_get_attachment_image_src( $gallery_img, 'full' );

and replace with following

$src = wp_get_attachment_image_src( $gallery_img, 'slider-gallery' );

4. Install "Regenerate Thumbnails" plugin and regenerate thumbnails with this plugin.

And then visit your website again.

Regards, C-Themes

Zdenek Balhar
5 years ago

Hello,

can I somehow change settings of accommodation carousel gallery? I need to fill in more than 1500 photos of apartments and all have SOME VERTICAL photos...image size is different.... and the vertical photo destroys the carousel.....The carousel must adjust according to image size

1.here in apartment
http://chorvatskoumore.cz/room-type/dum-orli-hnizdo-apartman-3-vertical/

2. here in an overview of apartment VERTICAL
http://chorvatskoumore.cz/accommodation/dum-orli-hnizdo/?adults=1&kids=0&rooms=1&date_from&date_to

3.in accommodation
http://chorvatskoumore.cz/accommodation/apartmany-ivusic-dum-na-mori/

....

This is a big problem ...tell me please how to do that the carousel gallery will adjust according to image size

Thank you very much