Support

Home Forums Events Calendar Add-on EE4 – Number of Events to Display Per Day (And/Or variables)

EE4 – Number of Events to Display Per Day (And/Or variables)

Posted: December 18, 2016 at 4:12 pm


mvpdiscsports

December 18, 2016 at 4:12 pm

Hello,

I have lots of events running in different locations on the same day, and right now, the calendar just lists each event and pushes the calendar down.

Is there a way to have the calendar list a (+3 events) or some such? Or just default to a “(+X events)” where X is the number of events on that day, and perhaps “clicking” that link would just be linkable. Rather than continue to list each event and cause the calendar to resize in the extreme.


Josh

  • Support Staff

December 19, 2016 at 9:52 am

You can limit the number of events displayed per day in the month view by changing the short code on the page to be:

[ESPRESSO_CALENDAR max_events_per_day=3]

This will limit the display to 3 events and add a view more events link.


mvpdiscsports

December 20, 2016 at 10:08 am

Josh,

I am trying to put the calendar widget on my homepage. Which means shortcode functionality is limited. Any chance there is a way to do this outside of the shortcode? Or, do you recommend a shortcode widget that would enable it?

I am using one, and when I use your shortcode, it displays this –

http://imgur.com/a/GUvbG


Josh

  • Support Staff

December 20, 2016 at 10:38 am

So since you’re trying to put the calendar within the widget area, that requires a few extra steps. Normally, you’d simply put the short code in the home page’s main content area. Since you’ve added the short code into a widget, you’ll need to add a bit of code to a custom plugin to tell the home page to load the calendar scripts and styles. Some example code follows:

https://gist.github.com/joshfeck/e2a4bae79dbf89d56b03b8895ddeeef1

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


mvpdiscsports

December 20, 2016 at 12:16 pm

Josh,

Excellent. I created a new plugin. Added the shortcode that you mentioned, and now it looks like this monstrosity.

http://imgur.com/a/mfdxb

Is there a way to just add the “+more” functionality to the widget you guys already have for the EE calendar?


Josh

  • Support Staff

December 20, 2016 at 12:37 pm

That’s a really small space to squeeze a calendar into. Do you have a wider widget area you can display that in? The +more functionality cannot be added to the widget.


mvpdiscsports

December 20, 2016 at 1:10 pm

Josh,

We still run into the problem of it not being able to be dynamic enough for a mobile device, even if I put it on a page or a bigger widget, it still is not useable on mobile.

Any possible support for Gcal integration?


Josh

  • Support Staff

December 20, 2016 at 1:44 pm

Not sure how Gcal integration would be the solution. But there are some built in CSS styles that will take care of the calendar on smaller screens if you put the calendar in a bigger widget.

The support post ‘EE4 – Number of Events to Display Per Day (And/Or variables)’ 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