Posted: October 21, 2014 at 1:07 pm
|
Hi, Note: I am using the most recent Espresso_Arabica_2014 template files in my theme. I had to move things around a bit, but all of the pertinent code is in place. I have switched to Twenty Fourteen and the issues stated below persist. 1. Events (event list?? and category archives) are ordered by published date, rather than start date. It looks like this behavior has changed somewhat. In previous versions the Event List was ordered by publish date, but now it seems they are ordering by start date by default, which is ultimately what I want. Can someone confirm this change in the new version or am I crazy?? That being said, event category archives are still ordered by publish date, which is weird. They should be ordered by start date as well. It seems odd to me that ordering by start date is not the default behavior for everything… Publish date seems mostly irrelevant in the context of events, in my thinking. How do I order the events in event category archives by start date, with the nearest event (e.g. active events or events happening today) at the top and events in the future at the bottom of the list? 2. Past events are not showing on the events list “page” (e.g. /events – not a physical page) even though the “Display Expired Events” setting is set to yes. 3. Past events in event archives (categories, etc.) display even though the “Display Expired Events” setting is set to no. Ideal State Ideally, what I want is a way to display a list of upcoming events from nearest to farthest and in a separate list (separate page?) display past events from most recently expired to oldest expired event. I want to be able to click on an event category in either list and see events ordered by start date near/far. Both lists should include pagination. I thought about using shortcodes on pages, but the issue I face is I want more granular control over what is displayed/included in these lists (using get_template_part) and I can’t see any way to list -just- past events with a shortcode. You can see an example of “kind of, sort of” what I’m looking for here – http://lanyrd.com/topics/uiux-1/ I don’t need the month grouping functionality, but more the general “upcoming” and “past” tab style functionality. I’m totally ok with these being on separate pages with a page reload e.g. /events and /events/past etc. |
Hi Mike, Event Espresso uses the archive pages for WordPress. By default, these pages show content in reverse chronological order similar to a blog post. We have since change it to order by start date for the event. I ran some testing with the expired events toggle and it isn’t working as expected. I’ve created a report for the development team to review. The event category are currently sorted by published date. I’ve also create an enhancement ticket to update the default sort order. I’m not sure how to show only expired events but I’ll check with a team member and get back to you with more information. — |
|
|
Thanks Lorenzo, I appreciate the effort and look forward to some resolution. 🙂 |
Hi there Mike, A team member created an example of how to display expired events. This example is for the Genesis theme and it can be tweaked for other themes: https://gist.github.com/joshfeck/e2f6d67f981df6dc01f5 The bug report with the expired events is still in progress. — |
|
|
Hi, Do you have an example of doing this in a non-Genesis theme? I’ve tried a couple of “tweaks” and am not getting any results. |
|
Hi, Well now I seem to have it working somewhat, but it’s not exactly what I was expecting. I’m looking for a list of past events that looks and functions like the standard event list… but just expired events. I’ve tried using the template parts from Espresso_Arabica_2014 to get the rest of the event details (thumbnail, header, datetimes, etc.) and some of it is working, and some of it not so much. Also there is no pagination… I can’t just list an ever growing number of events on a single page. |
In the example, the limit is set to 100: ‘limit’ => 100, Could you drop that to a lower value such as 10? — |
|
|
Hi, I can and did exactly that but… regardless pagination doesn’t work. I passed in the paged query var, but it doesn’t seem to have any effect with this method. |
|
Hi, I had a lot of difficulty accessing the support forums today. I was wondering if you’d made any progress on the past events toggle and the sort by start date issue for category archives? These issues are causing us problems in productions as our past events aren’t accessible at the moment and categories archives are a hot mess. Also I managed to hack together a page template for only past events, but I still can’t get pagination working. We have hundreds of past events and I can’t put them all on one page, obviously. What do we need to do to hopefully move this along? Thanks! |
Hi Mike, I’m going to break things up in parts a bit. First, here’s an example of a “regular” page template that pulls in expired events, with pagination, that doesn’t involve using Genesis: https://gist.github.com/joshfeck/56bc9e4a3683779fe90f#file-functions-php A few notes: You’ll need to swap in your theme’s container divs because my example is likely not based on your WordPress theme. The container divs are commented at the top and bottom of the template (primary, main, and module). I tried to add comments to help you see what does what, and in case you need to change things from the example it might make more sense. You can also change the pagination to match your theme by copying the pagination markup from your theme’s archive template. You can also change the pagination options to meet your needs by using the information from the WordPress codex. The above example just has a copy from the example in the codex here: http://codex.wordpress.org/Function_Reference/paginate_links |
|
Going back to your initial post with items 1 & 3, your suggestions have been noted and a ticket to change the defaults has been filed with the dev team. In the meantime while this gets worked out, you can add the code in this gist to a custom snippets plugin and it will re-order and exclude expired events from the event category archives: |
|
Hi Mike, The Answer to your Question about this template
The issue is fixed and slated to be included in the 4.4.5.p release. I do not have an ETA for a release date for 4.4.5.p at this time. |
|
|
Hi Josh, Thanks for helping with the filter, that worked perfectly. The additional patches you provided for category sorting and expired posts removal also worked nicely. Do I need to be concerned this may cause conflicts when the actual fixes are added to EE4? Thanks! |
What might cause a conflict, for what fix? |
|
|
I was told there was ticket in place to add sorting by start date to the event categories, so that’s the fix I’m speaking of. The thing that kicked all of this off was I was using the a method recommended by you guys to sort my event list by start date. When you guys made start date the default sorting for the event list, it broke our event list… I had to remove our modifications to get it working again. The thing is I had no idea that had changed, so was totally unclear why things stopped working properly. Add to that the expired event toggle issues and everything was a hot mess in prod. I just want to make sure that scenario won’t repeat itself with event categories. Thanks! |
Hi, The patches that we provided will be included in 4.4.5. We provided those so you could move forward with your project. — |
|
Hi there, A little update on this: The fix for the issue with the Displayed expired events setting that you reported here is included in Event Espresso 4.4.5 which is available as an update now. |
|
Hi Mike, |
|
|
Hi, Hi and thank you for the updates, unfortunately this has just caused more problems than it solved. As of the 4.4.6p release 1. Categories are completely broken again now – I just get a “no events found” error message. Did something change in the templates that could be causing this? It was working fine in 4.4.5p. I really don’t want to have to update the templates unless I absolutely have to as it’s a manual pain. 2. If the “Display Expired Events” toggle is set to “no” so past events don’t display on the main Upcoming Events page, it breaks the page template that pulls in only expired events on the Past Events archive (the code you previously provided above). The only way I can show anything on the Past Events page is to toggle expired events “on”, which of course also displays them on Upcoming Events. You can see things work fine here: https://www.premierinc.com/events/ And are totally broken here (4.4.6p): http://premierha.staging.wpengine.com/events/ All I did was update the plugin to 4.4.6p Very frustrated with this process. Is it possible to contact someone directly to help us work through these issues? |
Hi there, I’m sorry for the trouble. While the fixes to the category archives fixed the original issues reported, it introduced some new bugs. There’s a developer working on a fix for the issues you reported, and once they are ready we’ll release a 4.4.7.p update. In the meantime if you’d like to go back to using Event Espresso 4.4.5.p, you can download a copy here: Update: Event Espresso 4.4.7.p is available and fixes the issues reported here.
|
|
|
Hi and thanks for getting back to me… Obviously we can’t update production, so we’re staying on 4.4.5p for now. What about the second point above… the broken past events code? |
Is it broken in 4.4.5.p? |
|
|
Hi, No, just in 4.4.6p… Were you saying the fixes for the event category archives is what broke the code for my past events template? I’m just going to roll staging back to 4.4.5p and wait for your next release and see where we are at that time. |
Right. The issues are with the expired events + 4.4.6.p. The fix for the category archives issue had the unintended effect of new adding new bugs for displaying expired events whether it be a single event or in an archive loop. |
|
|
Hi, I’ve also had to roll back to 4.4.5 as the links to expired events are broken. People on the public site who click a link to event expired are met with a page not found message, and I get the same if I click on ‘view’ from with the EE4 admin. |
A little update on this: We are still working on a fix. It’s turning out to be a tricky one. |
|
The fix is available in Event Espresso 4.4.7.p, which was released today. |
|
|
Thanks Josh! I will try to get this in our staging environment today and report back. |
|
Hi, Did you have any success with 4.4.7 on your staging server? |
The support post ‘EE4 Issues with Order by Start Date & Displaying Expired Events’ 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.