Support

Home Forums Event Espresso Premium Event header date not displaying the way I want

Event header date not displaying the way I want

Posted: February 16, 2017 at 8:21 pm

Viewing 8 reply threads


tsmith

February 16, 2017 at 8:21 pm

Something has changed (not sure exactly when it happened, but it’s been quite a while I’ve been trying to fix this) and under the image on events it shows something like this:
2017-02-18T19:00:00-05:00 7:00 PM
I want it to just display:
Saturday, February 18, 2017 7:00 PM

Anyone have a suggestion?
I’m using Iced Mocha theme.
Thanks!


Tony

  • Support Staff

February 17, 2017 at 7:18 am

Hi there,

Thank you for reporting this, I can reproduce this and have created a ticket for our developers to investigate.

In the mean time are you using a child theme for iced mocha? If not I’d recommend creating one: https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/

Then you can copy the content-espresso_events-header.php template file from within /{iced_mocha_theme}/content/espresso/ to your child theme (you will need to create the same directories there, so the file goes within /{iced_mocha_child}/content/espresso/) and change line 10 from this:

echo $post->EE_Event->primary_datetime()->start_date_and_time();

to this:

echo $post->EE_Event->primary_datetime()->start_date_and_time( 'l, F j, Y' );

That will force the dateformat your looking for.

  • This reply was modified 7 years, 7 months ago by Tony. Reason: Add directorys


tsmith

February 21, 2017 at 2:45 pm

I created a child theme according the the supplied directions, and changed the code in the .php file I copied over, but I am still receiving the same event time style:
“2017-02-22T19:00:00-05:00 7:00 PM”

Any other suggestions? It’s confusing our clients . . .


Tony

  • Support Staff

February 21, 2017 at 2:56 pm

The above change should fix it.

Did you activate the child theme from your dashboard?


tsmith

February 21, 2017 at 3:00 pm

Yes, I did. I just double checked. And I believe I set it up correctly because I lost my header graphic and had to add a new one after I switched to my child theme. Everything else seems to be the same.


Josh

  • Support Staff

February 22, 2017 at 9:18 am

Hi there,

There’s actually an important step that was missed in Tony’s direction:

You need to put the custom template into the /content/espresso folder of the child theme.

So if there isn’t one already, you create a /content folder in the child theme, then create an /espresso folder in /content. Then you move the template into the /espresso folder.


Tony

  • Support Staff

February 22, 2017 at 9:58 am

@tsmith My apologies, I really should have included that in the above.

You need to follow the same directory structure used in the parent theme when copying templates over to a child theme, I’ve edited my above reply for any future readers.


tsmith

February 22, 2017 at 5:18 pm

Success!!! Thank you all so much 🙂


Tony

  • Support Staff

February 23, 2017 at 8:43 am

You’re most welcome.

Any further problems please do let us know.

Viewing 8 reply threads

The support post ‘Event header date not displaying the way I want’ 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