Support

Home Forums Event Espresso Premium Upgrading to 4.8.21 messed up the front-end single event page

Upgrading to 4.8.21 messed up the front-end single event page

Posted: November 12, 2015 at 3:06 pm


Elnino

November 12, 2015 at 3:06 pm

Hi there,

I saw a post related to Jetpack for a similar problem (though it seems to be in the back-end) but I do not have Jetpack enabled on my site.
Since the upgrade to 4.8.21 this is a screenshot of my single event page (no tickets selection available):

http://screencast.com/t/tIK2qKMgGr

Ive reverted it to 4.8.20 and its back to normal:

http://screencast.com/t/6NlaCqduVz

Thanks for your help!


Josh

  • Support Staff

November 12, 2015 at 3:13 pm

Hi there,

Are there any custom templates for your single event page in your WordPress theme?

It will help to know the name of the theme, or where we can get a copy of the theme so we can rule out whether or not it’s a theme issue. The new version of Event Espresso 4 adds a feature where you can re-arrange the content of the single event page, but your theme (or another plugin) may not be ready for that.


Elnino

November 12, 2015 at 3:23 pm

Yes there is indeed a page like this that I’ve built based on the following thread:

https://eventespresso.com/topic/customize-the-date-of-an-event-post/

Theme is RT-Themes 15.

What’s my option then as I still want to be able to customize the date on my post (to get the date of the event and not the date of the post)?

Thanks!


Josh

  • Support Staff

November 12, 2015 at 3:51 pm

If the event content loads correctly with single.php, you can add the custom date display to single.php and wrap the date display in a conditional check.

Like this:

<?php 
if ( 'espresso_events' == get_post_type() ) {
EE_Registry::instance()->load_helper('Event_View');
$event = EEH_Event_View::get_event();
$datetimes = $event->datetimes_ordered($show_expired = FALSE, $show_deleted = FALSE);
$datetime = reset($datetimes); ?>
<div class="date">
<span class="day"><?php $datetime->e_start_date('d'); ?>
</span>
<span class="month"><?php $datetime->e_start_date('M'); ?></span>
<span class="year"><?php $datetime->e_start_date('Y'); ?></span>
</div> 
<?php
} else {
?>
<div class="date">
<span class="day"><?php the_time("d") ?></span>
<span class="month"><?php the_time("M") ?></span>
<span class="year"><?php the_time("Y") ?></span>
</div> 
<?php }	

This way you do not have to maintain a separate template just to change the way the date is displayed.


Elnino

November 12, 2015 at 4:13 pm

Thanks it worked perfectly fine. I’ve reupgraded to 4.8.21 and it’s now still working. I was not aware of this condition

( 'espresso_events' == get_post_type() )

Thanks to you I’ve fixed my issue here as well:

https://eventespresso.com/topic/changing-date-format-for-event-list/

Thank you!

The support post ‘Upgrading to 4.8.21 messed up the front-end single event page’ 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