Shorter duplicate events calendar

Hello, we are currently using the Events Calendar app on our events webpage, but would like to create an additional module on our home page that doesn’t list all of the Events. Is there a way to reduce or control the number of events pulled? Basically:

  1. Events Page: List all the events
  2. Home Page (module): List only events happening soon

Thanks!

1 Like

Hi @Holocaust_Center :wave:

We’re so happy you decided to join us. Welcome :heart:

Unfortunately, there is no option to have different setting for the same widget on different pages. To do this, you need to create 2 different widgets.

I hope this explains things.

If any other questions come up, please let me know. I’ll be happy to advise!

Have a great day :slightly_smiling_face:

Hi @Holocaust_Center :wave:

We’ve got some good news for you!

Our dev team found a solution for your use case. You need to add these styles to the widget on the page where you’d like to reduce the number of events pulled:

<styles>
.eapp-events-calendar-grid-item:nth-child(n+5) {
  display: none;
}
</styles>

Depending on how many events should be displayed, you need to change the number in this part of the code:

nth-child(n+5)

n+5 - styles are triggered from 4 elements
n+4 - from 3,
n+6 - from 5

Please check it and let me know how it works for you :slightly_smiling_face:

1 Like