Thanks Sharon
I have worked with your solution but it does not work for me.
I have on my functions file on the theme support for featured images and I work with it on my diferent templates but I think this is not the way to get the post thumbnail from an event.
I think it work on other way on all in one event calendar
on the article where I get to show the post it uses:
foreach ( $dates as $date ) {
foreach ( $date['events']['allday'] as $instance ) {
$post_title = $instance->get( 'post' )->post_title;
$post_name = $instance->get( 'post' )->post_name;
$post_content = $instance->get( 'post' )->post_content;
$instance_id = $instance->get( 'instance_id' );
$content .= '<div class="hp-event">
<a href="ai1ec_event/'.$post_name.'/?instance_id='.$instance_id.'">'
.$post_title.'</a><br />'
.$post_content.
'<a class="read-more-link" href="ai1ec_event/'.$post_name.'/?instance_id='.$instance_id.'">read more</a>
</div>';
}
this is the article
https://gist.github.com/lukaspawlik/045dbd5b517a9eb1cf95
and this is the AI1EC Event properties
https://gist.github.com/lukaspawlik/c4a0e605414542e844dd
but I can not get the thumbnail image