Support

Home Forums Event Espresso Premium Two questions about Grid View Template -> Thumbnail size and titel display

Two questions about Grid View Template -> Thumbnail size and titel display

Posted: June 26, 2019 at 1:41 pm

Viewing 6 reply threads


adasch

June 26, 2019 at 1:41 pm

Hi there. I was wondering how to use the Grid View Template in a way that each thumbnail has a specific width and height. Right now it’s 150x150px. I’d like to run it with 650x300px. How do I do that?
I know the 150×150 come from the standard WP settings for thumbnails, but when I alter this values to 650×300, Event Espresso still shows a 150×150 image (although it is squeezed).

Also I’d like to know how to alter the display of event titel etc. Right now it’s only seen with a mouse-over action. I’d like to see this stuff always on top of the picture and I want to alter it via CSS. How is that possible?

Thanks!


Josh

  • Support Staff

June 26, 2019 at 4:44 pm

Hi,

These changes will require some modifications to the template and some additional CSS.

For the PHP/template changes you’ll:

1) Copy the add-on’s
espresso-grid-template.template.php file to your active WordPress theme
2) Change line 26 from:
$feature_image_url = $post->EE_Event->feature_image_url();
to:
$feature_image_url = $post->EE_Event->feature_image_url(array(650,300));
3) Optionally move the image html so it’s after the title html

Then for the CSS changes, you’ll add the following to the Additional CSS page (located in Appearance > Customize > Additional CSS)

.ee_overlay {
    position: relative;
    top: 0;
}
.ee_grid_box_v2 {
     max-width: 650px;
}
.ee_grid_box_v2 img {
    width: 650px;
    height: 300px;
}


adasch

June 27, 2019 at 1:31 am

works great – thank you!!


adasch

June 27, 2019 at 2:35 am

whops – I was too fast.
I kind of works. BUT if you change screen size, the image will be squeezed, because the height of the image won’t change.


adasch

June 27, 2019 at 2:45 am

Is it possible to add a now shortcode parameter like “featured=true” and to query within the template file whether “featered” is or isn’t set to true?

I’d like to make different grd views for some featured events on my ‘home’ page and have a “normal” view on my ‘overview’ page.


Josh

  • Support Staff

June 27, 2019 at 6:17 am

if you change screen size, the image will be squeezed, because the height of the image won’t change.

You can change the custom CSS from:

.ee_grid_box_v2 img {
    width: 650px;
    height: 300px;
}

to

.ee_grid_box_v2 img {
    width: 650px;
    height: auto;
}

I’d like to make different grd views for some featured events on my ‘home’ page and have a “normal” view on my ‘overview’ page.

What you can do is add a “featured” category for some of your events, then on the home page add the category parameter like this:

[ESPRESSO_GRID_TEMPLATE category_slug=featured]


adasch

July 1, 2019 at 7:01 am

I got it now! Thanks for your help!

Viewing 6 reply threads

The support post ‘Two questions about Grid View Template -> Thumbnail size and titel display’ 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