Im templating my events using php objects rather than placeholders.
However I have ran into one issue. I cannot get the image url or the attachment id from the $EM_Event object (see the returned object here).
How do I get the image information?
Im templating my events using php objects rather than placeholders.
However I have ran into one issue. I cannot get the image url or the attachment id from the $EM_Event object (see the returned object here).
How do I get the image information?
I realised I can use the same approach that is used to get a normal post / page attachment.
wp_get_attachment_image_src( get_post_thumbnail_id( $EM_Event->ID ))
alternatively:
$EM_Event->get_image_url();
that function is inherited from EM_Object
You must log in to post.