Support

Home Forums Event Espresso Premium Change Date Format in Category List

Change Date Format in Category List

Posted: June 11, 2013 at 5:08 pm


joelw

June 11, 2013 at 5:08 pm

My site uses [EVENT_ESPRESSO_CATEGORY event_category_id=”‘mycategoryid”] to display recurring events.  I want them to display using the format “Jun 4, 2013’ (three letter month, day, full year.) But they are currently displaying as ‘June 4, 2013’ (full month name, day, full year).  I’ve changed the date setting in General Settings, but it doesn’t seem to have any effect on the way these dates are displaying. Is there a different way to do this? The elongated dates are affecting the display of the site. You can see the page here: http://skillforge.com/courses/adobe-acrobat-x-pro-training/

 

Thanks!

 


Dean

June 12, 2013 at 2:42 am

Hi,

I tested that shortcode out with your date format (M d, Y) and couldn’t recreate the issue. Have you checked your template files as they look to be possibly modified, to make sure there isnt something in there affecting the date format?


joelw

June 18, 2013 at 8:07 pm

Sorry – my bad: we are actually using a line of php code to output the shortcode (long story, but we have to dynamically create it to link it to a product in our Shopp database.) This is what the code looks like:

echo do_shortcode(‘[EVENT_ESPRESSO_CATEGORY event_category_id=”‘.$catslug.'”]’);

For some reason – it is not picking up the date format we have set in the General settings of Event Espresso. Is it possible to manually add a format to this tag when we output it to change the date format that is being displayed? Thanks!


Josh

  • Support Staff

June 18, 2013 at 8:34 pm

Hi Joel,

The [EVENT_ESPRESSO_CATEGORY] shortcode uses the event_list_display.php template to display the list of events. It normally will use the date settings as set in WP>General settings under date settings.

This is the echo statement in event_list_display.php ( ~ line 75) you could try changing to override the setting it’s pulling:

<?php echo event_date_display($start_date, get_option('date_format')) ?>

to

<?php echo event_date_display($start_date, 'M d, Y') ?>


joelw

June 20, 2013 at 3:42 pm

Hi Josh,

Tried that but it didn’t seem to make any difference at all in how the date is displaying? I cleared my cache and made sure I was looking at a fresh page, but the date format remained the same?

 


Josh

  • Support Staff

June 20, 2013 at 4:01 pm

Do you have another copy of event_list_display.php in the theme directory or in /wp-content/uploads/espresso/templates? If there’s a copy there it will override what’s in the plugin directory.

If not, I suppose you could try changing the date format in the above code. It seems to me that the above code isn’t getting run though.

The support post ‘Change Date Format in Category List’ 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