March 24, 2013 at 2:33 am #21537
What is the best way to change the main slider dimensions so it displays images in a portrait orientation?
The ideal dimensions would be 460px wide by 600px highMarch 25, 2013 at 11:55 am #112181
There isn’t really a way to just change the slideshow dimensions by itself to get that effect because of the responsive layout and just how the slideshow is processed (being re-used site wide with variables).
You can use the Image Size options tab to get the image un-resized in either a left or right position in the slideshow which is I think as close to what you are looking for that the theme offers without having a developer customize the slideshow output.
The tab is in the image options for that specific page in the Featured media:
DevinMarch 26, 2013 at 12:16 am #112182
Yeah, I have it set up that way, but it still serves them up in a landscape view. Not ideal for my customer who wants to display portrait headshots. But, I figured out the code changes needed, so if anyone else needs this solution here is what I did:
The slider content container is 930px wide, when using the small left or small right slider the images are half that, so 435px wide. The width of a portrait shot is approximately 77% of its height. To get my images to display correctly I needed to create new thumbnails 435px wide by 563px high, cropped if necessary so the slider doesn’t move up and down.
Go into functions.php and find the section where additional thumbnails are registered, about line 70. Add a new image size like so:
$avia_config['imgSize']['portrait'] = array('width'=>435, 'height'=>563 );
Now you need to tell the slider to use the new portrait size. Open up includes/admin/helper-slideshow.php and look for this code block at about line 280:
if(strpos($slide['slideshow_image_layout'], 'small') !== false)
$this->img_size = 'portfolio'; // change this to 'portrait'
$this->img_size = 'featured'
Upload the modified files and check your handywork. Mine worked perfectly.
I have NOT checked this thoroughly for side effects, so be sure to test this out before you go live. Mine is installed on a small site where ONLY this slider is being used.March 26, 2013 at 12:42 pm #112183
The topic ‘Change dimensions of slider’ is closed to new replies.