Support

Home Forums Event Espresso Premium Customize date range

Customize date range

Posted: January 8, 2014 at 3:01 am

Viewing 5 reply threads


Daniele Pavinato

January 8, 2014 at 3:01 am

Hi,

if I have a date range bigger than one day I would like to display it like this:

[start day – end day] [month] [year] -> 01 – 07 Dec 2013

Is possible?


Dean

January 8, 2014 at 3:23 am

Hi,

It is possible, but you would need to change the template files, and swap out the date code for something custom

This will supply the dates in your required format, but you may need to tweak it with an if else statement to account for events that are only on one day

<?php echo date('d', strtotime($start_date)) . " - " . date('d M Y', strtotime($end_date)) ?>

That will work for the event_list_display.php template. The registration_page_display.php template may need more work due to its different layout.


Daniele Pavinato

January 8, 2014 at 5:16 am

Thank you very much.

Another question:

How can I explode the $location variable in separated details?
I would like to display separately “address”, “city”, “zip code”, “state”, ect.


Dean

January 8, 2014 at 5:49 am

Hi,

PHP Explode is what you need – http://fi1.php.net/explode


Daniele Pavinato

January 8, 2014 at 6:16 am

Thanks Dean!


Dean

January 8, 2014 at 6:32 am

No problem, I’ll mark this as resolved.

Viewing 5 reply threads

The support post ‘Customize date range’ 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