Support

Home Forums Event Espresso Premium Event_list shortcode "Blanking" current Events

Event_list shortcode "Blanking" current Events

Posted: April 1, 2015 at 3:19 pm

Viewing 4 reply threads


Jerry Bold

April 1, 2015 at 3:19 pm

Hello!

The Events/Calender page of the site in question is: hscmd.org/events

[EVENT_LIST category_identifier=’$cat’ order_by=start_date sort=ASC events_per_page=5 show_expired=false]”

If you look at the “Parent Educational Class” events, there seem to be “blank” entries in the pagination from the query for the classes already in progress or finished for the day.

I realize that classes that “expired” that day should no longer be pulled, but shouldn’t that also mean the later classes move-up the list into the first page of pagination?

the same thing happens on the Community Notification Meetings, and Upcoming Community Events but much less frequently/severely.

I can provide a development site + credentials if needed! I believe my support license is still active, looking forward to a reply when available!


Lorenzo Orlando Caum

  • Support Staff

April 1, 2015 at 3:33 pm

Hi Jerry, are you referring to these specific events?

http://cl.ly/image/3y0o170f1Y3O

As I progress through the pagination (e.g. 2,3), the dates in April changes so those would be upcoming events.

The classes in the screenshot above are also upcoming but they’ll be expired later this evening.


Lorenzo


Jerry Bold

April 1, 2015 at 3:38 pm

Thank you for your quick reply Lorenzo!

Yes, I’m refering to those Events on April 1st as well as April 3rd and April 5th and on. The first set are all paginated at 2/page until we get to page 3 (which is 5/page) then page 4 (is 4/page) until returning to normalcy on page 5+ in which case they are all the expected 5/page.

What do you think could be causing this inconsistency?


Dean

April 2, 2015 at 3:35 am

I think what’s happening here, is if the event’s registration period has closed, but the event itself is still upcoming, it is removing the event from the list later on, after the pagination has been created. So there are 5 events there, but some are not being shown as they cannot be registered for.

IF you don’t mind a little bit of copying and minor PHP work, we should be able to get this to showing the events whose registration has expired.

This link shows the basics of template modification: https://eventespresso.com/wiki/put-custom-templates/

In this instance we need to copy event_list_display.php & event_list.php over to wp-content/uploads/espresso/templates

Then, in the new wp-content location, edit the event_list.php and at around line 422 look for this code:

case 'NOT_ACTIVE':
//Don't show the event
//Uncomment the following two lines to show events that are not active and the active status array
//print_r( event_espresso_get_is_active($event_id));							//include('event_list_display.php');
break;

modify it so that it looks like this

case 'NOT_ACTIVE':
//Don't show the event
//Uncomment the following two lines to show events that are not active and the active status array
//print_r( event_espresso_get_is_active($event_id));							include('event_list_display.php');
break;

(all that’s been done here, is the removal of two // from before the include('event_list_display.php'); line).

You could modify the code to completely disregard the events that cannot be registered for but that gets more complex.


Jerry Bold

April 3, 2015 at 12:58 pm

Excellent Dean, I believe that did the trick! Looks like everything is filtering through and filling up the pages appropriately!

Awesome guys, thanks!

Viewing 4 reply threads

The support post ‘Event_list shortcode "Blanking" current 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