Support

Home Forums Event Espresso Premium Grid View Template – Featured Image Cropping

Grid View Template – Featured Image Cropping

Posted: August 19, 2014 at 11:38 am

Viewing 2 reply threads


Lisa Stephens

August 19, 2014 at 11:38 am

I am trying to stretch out the images in the Grid View template for Event Espresso, but when I change the dimensions of the box, the featured image file stays at a 150×150 photo, leading to stretching of the image. Is there any way I can keep the file as a rectangular image, to fit the new box size without stretching?


Josh

  • Support Staff

August 19, 2014 at 4:10 pm

Hi Lisa,

There is. If you look in the template file espresso-grid-template.template.php you’ll see the $feature_image_url variable set around line 26 (in the current version)

You can change it to something like this:

$feature_image_url = $post->EE_Event->feature_image_url(array(300,500));

The above change makes for an image width of 300 and a height of 500. You’ll need to adjust those values to match the image sizes you are using.

Along with that, you can add the following to your custom stylesheet to override the CSS:

.ee_grid_box img {
	height:auto !important;
}


Lisa Stephens

August 19, 2014 at 5:49 pm

Awesome, thank you!

Viewing 2 reply threads

The support post ‘Grid View Template – Featured Image Cropping’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso