Posted: January 4, 2017 at 12:41 pm
WP version 4.7 Website – http://www.dee4dogs.co.uk Hi all So you can see the “Future Courses” (Upcoming Events) widget on the right. That is currently showing “Puppyschool Newhall” an six week course that started on the 22nd December, and is no longer available to purchase tickets for (although there are still datetimes in the future – as the course is still on going. Why is it still showing in the “Upcoming Events” widget? In that widget I would ONLY like to display events that have the start date in the future AND that are not sold out. I thought that this plugin script below did this? (I don’t speak PHP – I just copy/paste)
Thank you for your help
|
|
I’m wondering if this post holds a clue… although I’m a little out of my depth. Thanks |
|
Hi there, The other thread that you linked to has instructions on how to make customizations to the Upcoming Events Widget. That’s an older topic, and if you want to make a custom Upcoming Events Widget to show only events that available for registration, you can use this instead: https://gist.github.com/joshfeck/27a285c4285a6c986053 Then, in the above linked code, the where clause (or If you need help with that query, we can dig into that code further. |
|
OK, so I’ve got that github code working, and the “custom” upcoming events widget working. Your help with the $where query would be great! Thanks. |
|
Bump. Hi guys, I would really appreciate your help to get the widget showing only events available for registration. THanks. |
|
So in your custom widget code, there’s a line of code that sets the where clause that starts with:
You can change the above to be this instead:
|
|
Legend!! Thanks a million. Works perfectly. |
|
Yet another query. The widget is working great now – only showing future events with tickets. However, for SOME events it ONLY shows the start time of the first datetime. I cannot for the life of me find where this display option is set. I’ve looked at the options in the Widget control panel.. but they obviously affect ALL events displayed. The common factor between the events that are showing the END time… is that they’re all at the same venue… I’m gonna do some investigation. |
|
Hi Dee, Using this event as an example: https://www.dee4dogs.co.uk/courses/puppy-school-newhall-12/ Since creating that event have you updated it at all? Or did you just create everything in one go and its been setup since? If you edit the event, make no changes and just save/update then check the widget does it show the correct date range? |
|
Hi Tony, I’ve opened & saved the other events, but they’ve not changed. Typically, events get created in one go. They tend not to be updated, unless there are changes with clients bookings. Ideally, we’d just like it to show the start date, or the date range… but not the times. Thank you. |
|
Hello, We have found conditions under which this may happen and are working on some improvements so the dates are always shown. Those are currently being tested. We’ll update your support post once they have been released in a maintenance release of Event Espresso. — |
|
In 4.9.31.p a fix was added so the widget should show the date range correctly now. |
|
The support post ‘Upcoming Events Widget (4)’ 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.