Posted: August 21, 2012 at 9:49 am
|
We are using the calendar module and this code on the page to display the calendar in list format: [EVENT_ESPRESSO_CATEGORY event_category_id=”kids_classes” show_recurrence=true] The sort order is off and not listing the event by start_date. See here: Is we can do to get the start_date to rule in the ordering? |
Try using
|
|
|
Thanks for the reply! I tried that and it didn’t work. There’s no difference. You can see it here: |
It looks like it’s working for me. The events display by start date: Elementary Art- September 2012 Tiny Picasso- September 2012 Advanced Elementary Art- September 2012 Youth Drawing- September 2012 Youth Drawing- October 2012 Is there something else that I’m missing? |
|
|
Actually – I was working on the code in your module. That is what you saw the results of. In the uploads\espresso\templates\event-list.php file the line 98 is commented out: //$sql .= $order_by != ‘NULL’ ? ” ORDER BY ” . $order_by . ” ASC ” : ” ORDER BY date(start_date), id ASC “; This is the file (https://gist.github.com/3165268) that I was provided for another issue we had regarding recurring events. When I un-comment out the line above, you see the results that you mentioned. Upon further testing, it appears that the order_by attributes never gets passed to this function. I am currently researching why this is. in the meanwhile, I am hard coding $order_by so I can temporarily get past this issue. |
|
To be clear… I added / modified the code in events-list.php, line 98 to be: $order_by = “date(start_date) DESC,id”; That fixed it – albeit a bit ugly. |
Okay, I’ll make a ticket so we can look at it for the next update. I seem to recall this issue (the order by parameter not being used) but I thought it got fixed. |
|
|
It probably did get fixed. We’re using the following versions: Event Espresso 3.1.24.1.P (with a modified event-list.php file – see above) We haven’t updated because the last time we tried things broke. We backed the version down so we could go live quickly. |
I see. Most likely what broke is the function that controls the social media buttons which became an action instead of a separate function. It’s just one line of code on your display templates and can be removed entirely if you aren’t using that add-on. |
|
I think I have the sorting fixed now. I added a new shortcode parameter. Just needs to be tested. |
|
|
If there’s anything I can do to help test just let me know. |
The support post ‘Calendar Sorting Issue’ 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.