Support

Home Forums Event Espresso Premium Even Featured Image in [ESPRESSO_TABLE] custom template

Even Featured Image in [ESPRESSO_TABLE] custom template

Posted: March 7, 2018 at 10:22 am


Roland Pokrywka

March 7, 2018 at 10:22 am

Hi, I’ve been working on adding Structured Data schema markup for the events in the template file espresso_table.php in EE3, and I’ve managed to mark up almost everything except for the event featured image.

Could you please let me know if there is any way of getting the link to the featured image into that template?

I don’t have to have to display the image, only to bring the url

so I can use code
<span itemprop=”image” content=”URL of the featured image”></span>

also is there any way to bring the date of when the event was created?

Not the start/end of the event, just when I created it? that will be to markap offers.validFrom

Hope it all sounds clear?

Thank you! Roland


Josh

  • Support Staff

March 7, 2018 at 12:09 pm

Hi there,

If you have access to the $event_meta, the featured image is available by doing:

$event_meta['event_thumbnail_url']

If you do not have $event_meta, you can get it with:

event_espresso_get_event_meta(). Here’s a link to that function’s source:
https://github.com/eventespresso/event-espresso-legacy/blob/master/includes/functions/main.php#L256

If you have the $event object available, the date submitted can be displayed with:
event_date_display($event->submitted, get_option('date_format'))

The support post ‘Even Featured Image in [ESPRESSO_TABLE] custom template’ 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.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 6 months, 3 weeks ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!