Thought I’d share how to display an event photo within a post page since I didn’t find clear instructions on how to do it. I created a content-single-espresso_event.php and single-espresso_event.php pointing to it. this is the code:
Alternately, in your event_list.php (or registration_page.php), you could just add $event_thumb as a variable. So if I wanted to do that in the event list, I could go to lines 232 – 241 which is this:
Then do your if ( isset($event_thumb) ) { /* display thumb */ business in the `event_list_display.php. But the easier solution would be the EE_META shortcode.
is it possible to resize the image being fetched similar to what is being inserted into the functions thumbnail sizes?
add_image_size( ‘small-feature’, 500, 300 );
Sorry about the delay in responding. It’s not possible to use add_image_size() because the featured images in Event Espresso are not using the post thumbnail API (because events are not posts, so we can’t use it). There are a couple ways to limit the size that gets displayed:
Use CSS to set the image size. This doesn’t change the actual size of the file (so if it’s a 2000K file, it will still be loading the full image, just shrunk to fit your CSS rule), but it’s a quick and dirty solution.
Use the media uploader’s image sizes (thumbnail/small/medium/etc) when you are selecting your image and hitting Insert Into Post — that will use the cropped/thumbnail version instead of the full size version.
Viewing 6 reply threads
The support post ‘Display event photo’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.