If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
July 4, 2012 at 5:27 pm #13916
I have a slider on a portfolio item: http://www.thevelvetroom.dk/portfolio-item/franny/
As you can see, the content window keeps resizing because the image height varies. Is there a way I can lock the height of the slider, so no matter what aspect ratio the images have, nothing moves or resizes as the slides change?
(I do not want to crop my images to the same aspect ratio.)
BTW @Kriesi: I worked for a while on my site using Choises, but then I startede doubting if it was the right theme. I bought another one that looked really good, but gave up on it, as I had been spoiled by the brilliant backend functionality of your themes. It seems that many people make nice looking themes, but only a few make stuff that is enjoyable to work with :-).July 6, 2012 at 12:55 pm #81233July 6, 2012 at 1:08 pm #81234
I’m hardly an expert here, but it seems to me that either you crop or resize the pictures to fit the same height (remember, you don’t have to crop it), or the fixed-height of the slider would do the cropping for you. Fixing the images yourself would prevent problems with the pictures not showing up right.July 6, 2012 at 2:03 pm #81235
The images are already the same height. What do you mean by the fixed-height of the slider? Because that is what I am looking for: A way to fix the slider height, so I will just have various widths of black strip in the sides of the images, to adjust for the vatiations in aspect ratio.July 7, 2012 at 6:10 pm #81236July 8, 2012 at 6:05 am #81237
Try following css code -add it to css/custom.css and adjust the height value:
height: 300px !important;
PeterJuly 8, 2012 at 7:52 pm #81238
Thanks Dude. But I tried it out, (and ran the regenerate thumbnails function) and it fixes the height, but images are cropped. I need a solution that leaves all images uncropped with a fixed slider height.
Any other ideas?July 9, 2012 at 12:15 am #81239
So; you would like the pictures to resize themselves to fit the height of the slideshow?July 9, 2012 at 6:20 am #81240
In this case you can only solve the problem on the php level/thumbnail generation level. In includes/loop-portfolio.single replace:
and in functions.php define a new thumbnail size with:
$avia_config['imgSize']['portfoliomini'] = array('width'=>930, 'height'=>300, 'crop'=>true); // small portfolio single entry images
Afterwards regenerate the thumbnails.July 9, 2012 at 6:20 am #81241July 9, 2012 at 6:27 am #81242
Dude: With this
= array(‘width’=>930, ‘height’=>300, ‘crop’=>true);
it seems that I will be cropping the images. Isn´t that so?July 9, 2012 at 8:19 am #81243
Ok, I will answer that myself: Yes that will give me cropped images.
It seems that if you define a thumbnail size with width=y and height=x, and set crop to “false”, you will get images of width y and a varying height. I need to have a fixed height and a width that varies corresponding to the variations in aspect ratio.
If you look at http://www.thevelvetroom.dk/portfolio-item/franny/ you will see my problem clearly.July 10, 2012 at 11:34 am #81244
The topic ‘Fixed slider height on non-full width slider?’ is closed to new replies.