Support

Home Forums Pre-Sales get event image

get event image

Posted: April 7, 2015 at 3:05 am

Viewing 1 reply thread


Haroun

April 7, 2015 at 3:05 am

hi, how may i get the event image URL (using event id) ?


Dean

April 7, 2015 at 4:06 am

Hi,

EE4

In EE4 the event images are featured images, so you can get the URL in the same way as any other featured image:

$img_ID = get_post_thumbnail_id( $post->ID );
$featured_img = wp_get_attachment_image_src( $img_ID, ‘large’ );
$img_url = $featured_img[0];

EE3

//you need the event object loaded in $event, depending on where you are it
//may already be loaded or you may need to obtain it via the database
$event_meta = unserialize($event->event_meta);
$event_meta[‘event_thumbnail_url’]

Viewing 1 reply thread

The support post ‘get event image’ 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