Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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 high

    #112181

    Hi garydarling,

    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:

    11jaexg.png

    Regards,

    Devin

    #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'
    }
    else
    {
    $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.

    #112183

    Hey garydarling,

    That is actually a great solution though it is limited for a site wide use.

    Glad you found a solution that works for you :)

    Regards,

    Devin

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

The topic ‘Change dimensions of slider’ is closed to new replies.