Posted: November 27, 2014 at 12:28 pm
Hello Support, Is there a way to display the sub events and not just the first event on the E4 Custom Listing template add-on? The only way we see to do it currently is create only main events and not use the sub event capability. Thanks |
|
Hi, What is the difference between a regular event and a sub-event? The templates will show a list of events based on parameters that are set (e.g. events for a specific event category). — |
|
Hello Lorenzo, We want all of the sub events for an event to also show the dates and times available on the course listings page, not just the first sub event under the main event. |
|
Hi Susan, How are you setting up Sub Events? Is this is a single event with multiple Datetimes? |
|
That is correct Tony. How can we get the other date times to display on the course listing table? |
|
Hi, Please see this tutorial: https://gist.github.com/lorenzocaum/ac217033f12232404cce The first option will show the starting date times and the alternative options will show all date times along with an iCal button for each. — |
|
Hi Lorenzo, This worked great, however the main events are not ordered in descending order. This is the shortcode I used: Brampton [ESPRESSO_EVENTS_TABLE_TEMPLATE template_file=”espresso-events-table-template.template.php” category_slug=”bt-brampton” order_by=”start_date” order=”DESC” category_filter=”false” table_search=”false”] Oakville [ESPRESSO_EVENTS_TABLE_TEMPLATE template_file=”espresso-events-table-template.template.php” category_slug=”bt-oakville” order_by=”start_date” order=”DESC” category_filter=”false” table_search=”false”] Thanks for your assistance. |
|
Hi, Those tutorials don’t use the shortcode parameters. Try updating the datetimes on one of the events to sort the order. — |
|
Hi Lorenzo, Unfortunately your suggestion did not work. Any other ideas? This is critical to us. |
|
Does it work when those changes are reversed or was that not working? Also, could you let us know the version number for the add-on? — |
|
Hi Lorenzo, it does not work even after disabling the custom template… Any ideas? |
|
Anyone? |
|
Hi Susan, Can you link me to the page you are using that template on please? When I test this locally the events display correctly so I’d like to see if I can see a reason for this. |
|
http://safetycoursesforkids.com/children-safety-courses/red-cross-babysitting-course/ |
|
Hi Susan, The reason the sorting isn’t working correctly is the attribute should be ‘sort’, so the shortcodes need to be: [ESPRESSO_EVENTS_TABLE_TEMPLATE template_file=”espresso-events-table-template.template.php” category_slug=”bt-brampton” order_by=”start_date” sort=”DESC” category_filter=”false” table_search=”false”] & [ESPRESSO_EVENTS_TABLE_TEMPLATE template_file=”espresso-events-table-template.template.php” category_slug=”bt-oakville” order_by=”start_date” sort=”DESC” category_filter=”false” table_search=”false”] That should then allow you to alter the order. |
|
Tried the sort parameter even when switching back to the default event listing template and I am still having no luck. Could you please provide a solution? Thanks |
|
This did not work. Even when reverting back to the non modified custom listing template. Please provide a resolution ASAP. |
|
Would it be possible for me to take a look at the events on your site and dig a little deeper into this? If so please use this form to provide temporary login details: https://eventespresso.com/send-login-details/ The shortcode is working as expected for me locally, I’ve modified the template in the same way @lorenzo mentioned and the events are correctly sorted by datetime. Listing the events DESC shows highest (older) dates first. Fed 2015 then Dec 2014 etc Listing in ASC shows the lowest (newer) date first. Dec 2014 then Fed 2015 etc. Each event will show as a single event with all of that events datetimes listed and ‘first’ earliest datetime for that event will be used to sort. |
|
Hi Tony, I just sent the login details. |
|
Hi, I did a little investigating into this and it turns out this is being caused by the previous [ESPRESSO_EVENTS_TABLE_TEMPLATE] shortcode that is being used for Brampton (which currently lists no events) If you remove that shortcode from the page the events are listed correctly, however I have duplicated the event setup you have locally and used the shortcodes in the same way you have with no issues so I suspect this is due to the theme or plugin doing something strange with $wp_query. If you install Theme Test Drive you can activate another theme without altered the site for non-admins. Can you try activating a default theme such as twentyfourteen and re-testing that page, do the events display in the correct order? |
|
Hi Tony, Even with the default theme active the order issue still occurs. I realize this can be resolved by removing the shortcode for cities that do not have any events, however this is an unacceptable solution because it creates much more admin work for us because we then need to add the shortcode back when there are events for the city. Please help us with a resolution. Thanks |
|
Hi Tony, Any ideas? |
|
Hi Susan. I’m sorry for my delay getting back to you. We have managed to reproduce this issue locally and have created a ticket for our developers to investigate. When using multiple instances of the shortcode within a single page, the first instance will work as expected, but the order_by and sort values are being stripped from any subsequent instances of the shortcode. So in order to display your events correctly ordered by start_date you’ll currently need to either use a single shortcode on the page, or swap them around so that the shortcode that currently returns events is before the shortcode returning no events. So in the example in this thread it would be [ESPRESSO_EVENTS_TABLE_TEMPLATE template_file=”espresso-events-table-template.template.php” category_slug=”bt-oakville” order_by=”start_date” sort=”DESC” category_filter=”false” table_search=”false”] [ESPRESSO_EVENTS_TABLE_TEMPLATE template_file=”espresso-events-table-template.template.php” category_slug=”bt-brampton” order_by=”start_date” sort=”DESC” category_filter=”false” table_search=”false”] So that the oakville shortcode (which returns events) runs first and the brampton shortcode (which does not return events) runs after that (the order_by and sort values are un-needed if there are no events). However if brampton than does have events assigned to that category, those events will not be ordered correctly. Once we have found a fix and updated the Event Tables Templates Add-on you should then be able include both instances of the shortcode on a single page without issue. |
|
Could you please give us a rough idea of how long you expect this fix will take to be implemented? 1 week, 1 month, etc? Could you also notify us once the fix has become available? |
|
I added this thread to the ticket so we will post an update here once the update has been released.
Unfortunately I can not provide any timeline currently, our developers are investigating this so once the cause is found we will have more of an approximate timeline. |
|
Thank you Tony. |
|
Any update? |
|
|
Hi, The ticket has been assigned to a developer to look at but there is no update as yet. |
Thanks Dean. |
|
The support post ‘List Sub Events on EE4 Course Listing Page’ 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.