Support

Home Forums Recurring Events Manager Add-on Upcoming Events widget showing expired recurring events

Upcoming Events widget showing expired recurring events

Posted: October 15, 2013 at 3:30 am

Viewing 7 reply threads


Kristiina Lempiainen

October 15, 2013 at 3:30 am

Hi!

Is there a way to have the upcoming events widget show only upcoming recurring events, not also the expired events as it’s showing at the moment?

I found an answer suggesting to make a different category for expired events but I feel that’s a lot of extra work; so maybe there’s a way to edit widget.php-file?

I tried this what is described in the latest answer: https://eventespresso.com/forums/2011/09/widget-showing-old-events-recurring/
but I ended up having no events at all in the widget.

The widget has been used in this link for example:
http://helsinkitrainingco.fi/juoksupalvelut/

I have the latest version of WordPress and Event Espresso and Recurring Events Manager.

Thanks in advance!


Tony

  • Support Staff

October 15, 2013 at 3:50 am

Hi Kristiina,

Open up event-espresso\templates\widget.php. Line 41. It should look like:

$show_expired = $instance['show_expired'] == 'false' ? " AND (e.start_date >= '" . date('Y-m-d') . "' OR e.event_status = 'O' OR e.registration_end >= '" . date('Y-m-d') . "') " : '';

Change it to:

$show_expired = $instance['show_expired'] == 'false' ? " AND e.event_status = 'O' OR e.registration_end >= '" . date('Y-m-d') . "'" : '';

That will show only event that’s are Open or events with a registration_end date later than the current date. (basically the same thing)


Tony

  • Support Staff

October 15, 2013 at 3:52 am

Also to note.

As this is now a modified template I would advise you to copy the above file to wp-content/uploads/espresso/templates.

This will keep your modification after Event Espresso is updated.


Kristiina Lempiainen

October 15, 2013 at 4:01 am

HI!

After doing that change in widget.php there are still expired events showing and now the categories got mixed up.

There are 4 widgets in that sidebar where each one should show one event category. Categories went right before but after the change they got mixed up.


Tony

  • Support Staff

October 15, 2013 at 4:16 am

Strange, that change should not affect Categories.

Is it possible to get your log-in details to investigate this further?

If so please use https://eventespresso.com/send-login-details/

FTP are details are also important in this case.


Tony

  • Support Staff

October 15, 2013 at 4:48 am

The Widget (and Calendar) use an events ‘Status’ to determine if it should be displayed or not.

Open events (events withing Registration Begin/End dates) will always display.

The reason some of your past events are displayed in the widget is due to the registration date still being open, even tho the event has passed. If you go to Event Overview and then in the status filter dropdown select ‘ALL (Active/Inactive)’ then filter status. You will see some of your previous events are still ‘Open’

For example Event ID 19 -> Treenitehoa -kurssi has a registration end date of ‘2013-10-19’ which means the event will stay open until that date even if the event start/end date has passed. Generally speaking you’ll set this date to either on or before the event start date. This closes the event on the date of the event (if that date is used) as most people wont register to an event if it has passed already.


Jill Wheeler

October 17, 2013 at 2:49 pm

I’m having the same problem with my site. Events from last March are displaying in events. I’m using this shortcode to display the event. [accordion][accordion_content title=”Yoga”] [EVENT_ESPRESSO_CATEGORY event_category_id=”wellfityoga”][/accordion_content][/accordion] I have the Are all events available between the registration dates above?
No (each event’s registration start and end dates will be incremented according to a formula). box checked.
I made the suggested change to the widget.php file noted above and updated the registration begin and end dates. For registration to begin and end on same day. The old events from March are still displaying. I’m happy to give you the log in info for you to look further into this if you provide a direct email. Thank You for your help.
http://wellfitinstitute.com/events/
Paddleboard Yoga is event displaying expired events from March.
Please email me directly at gibranna@socialbutterflynaples.com


Tony

  • Support Staff

October 21, 2013 at 1:10 am

Hi Jill,

The previous events are marked as active events, we can see the events from march 2013 are still taking registrations. This would mean the registration end date is still open.

As you had ‘No (each event’s registration start and end dates will be incremented according to a formula)’ box checked it is either the dates were input wrong when creating the events (easily done), or any recent changes did not also have the ‘All Events in this series’ selection when updating.

If you could send your log in details using https://eventespresso.com/send-login-details/ we’ll be happy to take a look and advise.

*Note log in credentials need to be admin level.

Also we try to keep each persons issue within a separate topic, it helps us monitor and track issues easier and also causes less confusion if one persons issue is yet to be resolved whilst the other is posting there’s (not that is whats happening here, just an example). If you could create a separate thread for any future issues it would be highly appreciated 🙂

Viewing 7 reply threads

The support post ‘Upcoming Events widget showing expired recurring 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.

Event Espresso