Tagged: ajax, enfold, portfolio item
-
AuthorPosts
-
June 5, 2014 at 4:09 pm #275186
Hi,
I’m designing the site to represent my photography and design portfolio. All Items have different sizes and I would like to present not cropped images, when they display in Ajax gallery or in blog gallery post (Right now the main image is squarish).
Is it possible, that main image in gallery would follow original aspect ratio of my photographs, say some of the galleries would be horizontal, some square, some vertical?
And I’m not that great in programming, so I’ll be grateful for the simple explanation. Thank You :)
June 6, 2014 at 5:13 am #275444Hi Eve!
Thank you for using the theme!
Before doing this, please test it on a dummy site. First, edit functions.php, find this code on line 98:
$avia_config['imgSize']['gallery'] = array('width'=>710, 'height'=>575 ); // images for portfolio entries (2,3 column)
Replace it with:
$avia_config['imgSize']['gallery'] = array('width'=>9999, 'height'=>9999, 'crop'=>false ); // images for portfolio entries (2,3 column)
This will make sure that the theme will not crop the images and accept all proportions. After that, add this on Quick CSS or custom.css:
#top .portfolio-preview-image .avia-gallery img { float: none; padding: 7px !important; width: auto; display: inline-block; } #top .portfolio-preview-image .avia-gallery .avia-gallery-big-inner { text-align: center; }
Regenerate the thumbnails using this plugin: http://wordpress.org/plugins/regenerate-thumbnails/
Cheers!
IsmaelJune 6, 2014 at 5:12 pm #275673Well, it didn’t make any difference. Maybe my explanation was not correct. Let me add couple of pictures (I editing site with Enfold on localhost)
This is the way how my images look in Ajax gallery
And this is the way how they look in the Blog galleryAs of now I can’t use vertical images in galleries at all. And I like width 710 px, I just need to change the height to show the whole picture.
- This reply was modified 10 years, 6 months ago by Eve.
June 6, 2014 at 11:31 pm #275887Hi!
We need to see the site live in order to help you debug this issues.
Best regards,
JosueJune 7, 2014 at 8:59 pm #276104Hi!
I have very slow internet connection on phone so I made a test site.Ajax how it looks now and how I would like it to look, if possible.
Blog gallery same request
By the way, I did like when featured images for all portfolio items were in uniform squarish size, as it was before I applied first suggestion :)
June 7, 2014 at 9:02 pm #276105This reply has been marked as private.June 8, 2014 at 1:59 pm #276192Hey!
Thank you for the update.
Did you regenerate the thumbnails? Go to Tools > Regen. Thumbs. The suggestion above should prevent the theme from cropping and resizing the gallery images on the ajax portfolio.
Regards,
IsmaelJune 8, 2014 at 4:28 pm #276239Hey Ismael,
I applied your suggestion again on test site, it didn’t work there too. You can see it hereI applied the code in child theme/function.php
June 9, 2014 at 5:14 am #276340Hey!
Thank you for the update.
I tested one of the images on my end and as you can see, it is showing the full image:
I checked the test page but the thumbnail size of this image for example is still cropped: http://voyevoda.com/test/wordpress/wp-content/uploads/2014/06/spice-market-food-photography-4-700×575.jpg
Please add this on the child theme’s functions.php then regenerate the thumbnails again:
function avia_change_image_size_array() { global $avia_config; $avia_config['imgSize']['gallery'] = array('width'=>9999, 'height'=>9999, 'crop'=>false ); // images for portfolio entries (2,3 column) avia_backend_add_thumbnail_size($avia_config); } add_action( 'init', 'avia_change_image_size_array', 1);
Add this on Quick CSS or custom.css:
#top div .avia-gallery img { width: 100%; height: 100%; }
Best regards,
IsmaelJune 10, 2014 at 6:16 pm #277055Hi Ismael,
This time it worked :) Thank You so much! -
AuthorPosts
- The topic ‘How to get Vertical Gallery for portfolio Items’ is closed to new replies.