• Resolved John

    (@jemoreto)


    Hello guys!

    Again, thanks for the AWESOME plugin!

    I’m trying to use a calendar in the homepage of a site.
    How to limit the events retrieved in this calendar?

    I need to show a calendar showing at most five events.

    I created a specific calendar for the homepage in the plugin, and tried a lot of combinations in the settings, but can’t control the number of events retrieved.

    What I need is something like this:
    Calendar start: Today
    Earliest event: 7 days
    Latest event: 7 days

    Considering this settings, how to retrieve ONLY five events?

    I already tried to limit the “Maximum Events” to 0005 and other values, but don’t work properly.

    Thank you!!!

    Cheers

    https://www.ads-software.com/plugins/google-calendar-events/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Nick Young

    (@nickyoung87)

    Hey John,

    Are you trying this with a grid calendar? Currently there is only a “Span” option available in the list view.

    Thread Starter John

    (@jemoreto)

    Hey Nick!

    I’m using list view.
    I’ll try other configs and let you know.

    Thanks!

    Plugin Contributor Nick Young

    (@nickyoung87)

    Alright the span option should work for you then since you are using list view. Here is how you can find it:

    https://screencast.com/t/RB2QwDv1m5S

    Nick,

    Did you use “Maximum Events” and get the events limited to the value, but not necessarily the events you expected?

    I recently posted a comments about getting the “Next X Events” … and it looks like there is no default sort in the Google Calendar API call. So, even though the event list is, indeed, limited to the value supplied–there is no rhyme or reason to which events it returns.

    I was attempting to get the “next 1” event for our club and realized that I needed to set the “orderBy” parameter to the “startTime” value to ensure that the “1” returned was the “first” event. If you are getting 5 events–but they are not the 5 events you expect–this might be your issue.

    Plugin Contributor Nick Young

    (@nickyoung87)

    That is a good point. We did notice some things with how Google pulls in events can be kind of tricky. For another instance, if you have recurring events it seems to pull them all at once one at a time before moving onto the next events and so on. This is likely an area we can improve in for sure.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Limit the events retrieved by a calendar’ is closed to new replies.