-
AuthorPosts
-
December 20, 2015 at 12:03 am #555462
I was given this code a while back so that the entire image was visible in the grid view of posts. Each time I updated the theme, I would place the code in the functions.php, and it would work, but now it is not?
Also is there a way to do this using Enfold / Quick CSS so that I do not have to redo it each time the theme is updated:
The coding I currently have:
Hi gb!
Please go to Appearance > Editor and open Functions.php file and find following line
$avia_config[‘imgSize’][‘portfolio’] = array(‘width’=>495, ‘height’=>400 );
and change it to following$avia_config[‘imgSize’][‘portfolio’] = array(‘width’=>495, ‘height’=>400, ‘crop’ => false);
Best regards,
YigitDecember 20, 2015 at 4:23 am #555530Hey gb!
Try this out, https://kriesi.at/support/topic/override-the-global-avia_config-within-child-functions-php/#post-124156.
Cheers!
ElliottDecember 20, 2015 at 4:34 am #555532Hey Elliot,
I added the code below (as found in your link) to the bottom of my Functions.PHP, but nothing changed.
Did I place it incorrectly?
function avia_change_image_size_array() {
global $avia_config;
$avia_config[‘imgSize’][‘page’] = array(‘width’=>620, ‘height’=>200);
}
add_action( ‘init’, ‘avia_change_image_size_array’);December 20, 2015 at 4:42 am #555533Here is a link to demonstrate the issue:
http://www.gregorybeylerian.com/tag/drawings/
You will see that the post, “Flowers In A Vase” is cut off on the top and bottom of the thumbnail grid view image.
December 20, 2015 at 4:56 am #555536OK, final update..
So I noticed that when I add this code:
$avia_config[‘imgSize’][‘portfolio’] = array(‘width’=>495, ‘height’=>400, ‘crop’ => false);
It works for some gird view posts but not all. So I re uploaded “Flowers in a Vase” again, with that code in place and sure enough, it was NOT cropped.
So I guess all the cropped posts are because they were loaded when that code was not there, and the theme already created a cropped version for the grid view post?
I guess I have to remember to manually update the Functions PHP file each time there is a theme update?
Best,GB
December 24, 2015 at 4:52 am #557343Hey!
Whenever you change the sizes try regenerating the thumbnails again with this plugin, http://wordpress.org/extend/plugins/regenerate-thumbnails/.
Best regards,
Elliott -
AuthorPosts
- The topic ‘Code to "Not crop the grid view of posts" no longer working?’ is closed to new replies.