Support

Home Forums Event Espresso Premium How to Display Timezone on Main Events Page and Individual Event Pages?

How to Display Timezone on Main Events Page and Individual Event Pages?

Posted: January 3, 2017 at 5:17 pm


jeffw@sky-line.com

January 3, 2017 at 5:17 pm

Is there a way to have EE4 display a timezone next to the date/time on both the main Events page (we’re using Event Table Display plugin) and on the details pages for each event?

I’ve read several forum posts about timezone displays but most of them are older (2013, 2015) and it seems that at the time, this was not a “standard” option – I’m hoping that functionality has been built into EE4 by now (without PHP/template customization)?


Josh

  • Support Staff

January 4, 2017 at 12:53 pm

Hi Jeff,

That’s going to require adding a bit of PHP to a custom function. You will not need to customize the actual plugin files though.

add_filter( 'FHEE__espresso_list_of_event_dates__datetime_html', 'my_add_timezone_to_datetimes', 9, 2 );
function my_add_timezone_to_datetimes( $html, $datetime ) {
	$html .= ' Your Timezone';
	return $html;
}

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


jeffw@sky-line.com

January 6, 2017 at 3:55 pm

Josh,

This worked great for the individual events pages. Timezone now displaying. Thank you.

However for the Main Events page (showing all events), nothing changed. Again, we’re using the Events Table List add-on. Perhaps PHP needs to be added somewhere else as well for it to work with the Events Table layout?

For reference, here’s the page: http://sky-line.com/events/


Josh

  • Support Staff

January 6, 2017 at 8:56 pm

Yes, the template for the Events Table layout is located in wp-content/plugins/eea-events-table-view-template/templates/espresso-events-table-template.template.php. There’s a customization guide for that template in the documentation:

https://eventespresso.com/wiki/events-table-view-template-add-on/#customizations

The support post ‘How to Display Timezone on Main Events Page and Individual Event Pages?’ 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