Support

Home Forums Community Forum Customising EE4 Template Tags

Customising EE4 Template Tags

Posted: January 26, 2015 at 6:09 am

Viewing 3 reply threads


Jay Reid

January 26, 2015 at 6:09 am

Are there any parameters that can be used to edit the EE4 template tags. E.g. how can I make this tag …

<?php espresso_event_date( $post->ID );?>

Display as “JAN 26”. Currently it displays as “899 12:11 PM”.

Thanks


Dean

January 29, 2015 at 6:10 am

Hi,

The function resides in: /wp-content/plugins/event-espresso-core-reg/public/template_tags.php

and its parameters are: $date_format = ”, $time_format = ”, $EVT_ID = FALSE, $echo = TRUE

So, to change the date format use, something like:

espresso_event_date($date_format = 'M j', $time_format = '', $EVT_ID = FALSE, $echo= TRUE);

PHP date formats: http://php.net/manual/en/function.date.php


Jay Reid

January 30, 2015 at 6:47 am

Thanks, so how do I remove the time? This code is returning the time also. Previously I just put “M j” alone in the tag I had above, this returned to format as I wanted it, but also returned the event time.

Do you know how I can remove this using your tag?


Jay Reid

January 31, 2015 at 4:56 am

All sorted!

Viewing 3 reply threads

The support post ‘Customising EE4 Template Tags’ 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