Events Planner Logo
Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Event date display and sort order

Kitka — Jan 26, 2017 04:56PM MST

Hello,
In the settings for Events Planner I have events selected to sort by Event Start Date and to display d/m/Y, however when I inserted a shortcode to display the events on a page their date is m/d/Y and are not in date order. Shortcode is [events_planner display="list-class" display_cols="date,title,regis_button,available_spaces"]

Latest version of WordPress and the plugin (Pro version 2.0.8.1)

Any suggestions?

Kitka


7 Community Answers

Abel - Jan 26, 2017 at 08:29PM MST

WP Events Planner Agent

Hi Kitka.

Ah, yes. I can give you a new corrected template file that will solve the issue. Are you comfortable with adding a file via FTP? If so, please let me know and I will email you the file. If not, please set me up as a WP admin user on the website and I will gladly do it for you (email login details to help a[t]~ wpeventsplanner.com). Please don’t post the credentials here as this is a public post.

Thanks, Abel

rated : 0 Up Down

Kitka - Jan 29, 2017 at 03:31PM MST

Yes, no problem. I have FTP access and can edit PHP files.

rated : 0 Up Down

Abel - Jan 30, 2017 at 09:52AM MST

WP Events Planner Agent

Hi Kitka.

Great. Let’s try this.

Please edit “\wp-content\plugins\events-planner-pro\application\views\front\event-list-class.php”.

Change line 139 from
$event_dom = date_i18n( "m/j/Y", $date );
to
$event_dom = epl_formatted_date( $date )

Please let me know if it works for you. The d/m/Y format is very tricky to work with.

Thanks, Abel

rated : 0 Up Down

Kitka - Jan 30, 2017 at 11:05PM MST

Thanks so much Abel. The dates look much better.

However for some reason they are still not in date order - I have set them to list by start date. This is a sample of how they are listing:

Start Date Title Available Spaces
February 8, 2017 Relief and Intaglio Photopolymer Printmaking Sold Out 0
May 4, 2017 Relief and Intaglio Photopolymer Printmaking Sold Out 0
November 11, 2017 Relief and Intaglio Photopolymer Printmaking Register 4
February 17, 2017 Copper Plate and Photopolymer Workshop Register 4
August 25, 2017 Copper Plate and Photopolymer Workshop Register 4
March 1, 2017 Embossing Workshop Sold Out 0
April 5, 2017 Embossing Workshop Register 4
May 3, 2017 Embossing Workshop Register 4
October 4, 2017 Embossing Workshop Register 4
November 8, 2017 Embossing Workshop Register 4
March 4, 2017 Explore Simple Print Techniques Sold Out 0
August 30, 2017 Explore Simple Print Techniques Register 4

rated : 0 Up Down

Kitka - Jan 31, 2017 at 06:03PM MST

Oh, I found a way to force the sort order in the shortcode itself. That should work OK.

Kitka

rated : 0 Up Down

Michael Taylor - Feb 01, 2017 at 03:01PM MST

Abel,

I have the same issue, today, Feb 1, that Kitka had on Jan 26, that using [events_planner] the events are not sorting by start date. I have just installed your plugin to trial it before upgrading. Am I having the same problem and do I require the same fix?

Thanks.
Michael

rated : 0 Up Down

Abel - Feb 01, 2017 at 07:56PM MST

WP Events Planner Agent

Hi Michael.

Please let’s try this. Edit one of the events, hit Update and check the page that has the shortcode. If the events are still not in the correct order, please set me up as an admin user on the website and I will gladly check it out (email login details to help a[t]~ wpeventsplanner.com). Please don’t post the credentials here as this is a public post.

Thanks, Abel

rated : 0 Up Down

Post Your Public Answer