Support

Home Forums Event Espresso Premium How to add the short form of the day within the listing?

How to add the short form of the day within the listing?

Posted: June 7, 2015 at 7:14 am


eventMaster

June 7, 2015 at 7:14 am

Hi,

I think it is quite important to be able to do this. Especially if the customers are of a certain age group. Please guide us on how to add a short name into the listing. Please see image in this link for clearer understanding.


Tony

  • Support Staff

June 8, 2015 at 5:24 am

Hi,

Can you let me know which event listing are you looking to add this to?

The images appears to be from the Event Table template is that correct?

If so you will need a custom template to do the above, which is not something we provide over the forums, although we can point you in the right direction.


eventMaster

June 8, 2015 at 9:32 pm

Hi,

Yes the image is from Event Table Template. Its much easier to plan if from the date user can straight away see the day in question. It will be helpful if you could show me how to do it. When its done, I dont mind sharing it here for others who might want to do the same thing.


Josh

  • Support Staff

June 9, 2015 at 8:35 am

Hi there,

You can learn about your date formatting options from this codex guide:

https://codex.wordpress.org/Formatting_Date_and_Time

Please note that there are two Weekday name options: (l) for full name or (D) for the three letter name.

Then you can make your change to the Event table add-on’s template file. You open up the espresso-events-table-template.template.php file, which is in the eea-events-table-view-template/templates/ folder, and change line 3 from:

$date_format = get_option( 'date_format' );

to something like this:

$date_format = 'd/m/Y (l)';

Then you can make any other alterations you’d like to make to the template.

You can prevent losing your changes on an update by copying your modified template file to /wp-content/uploads/espresso/templates. The custom template will load from that location.


eventMaster

June 13, 2015 at 10:36 am

Hi Josh,

It works awesomely well. As expected will need to edit abit as the cell becomes longer.

Your help is greatly appreciated. Hope this helps anyone who needs to change the date format to include a short day function in the table view.

$date_format = 'd/m/Y (D)';

The support post ‘How to add the short form of the day within the listing?’ 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