Support

Home Forums Event Espresso Premium Grid View Offset Events

Grid View Offset Events

Posted: November 2, 2021 at 9:27 pm


joyandraenton

November 2, 2021 at 9:27 pm

In Grid View, can I offset the list? For example, skip the first 2 events and load 3, 4, 5, etc.
Thanks


Tony

  • Support Staff

November 3, 2021 at 8:16 am

Hi there,

Hmm, good question.

So no, not based on the number in the grid, but may I ask what the events are being skipped based on?


joyandraenton

November 8, 2021 at 5:36 am

By date. I want to skip the 2 most current events, so I can display the 2 most current upcoming events in the normal full format, and the following 5 events in the smaller grid view format.


Tony

  • Support Staff

November 9, 2021 at 6:35 am

Hmm, so one way to do this without custom code is to set the ‘limit’ attribute on the shortcode to be +2 whatever number you actually want to use and then use some CSS to hide the first 2 events.

The grid template is already ordering by start_date so you can use something like:

[ESPRESSO_GRID_TEMPLATE limit=7]

Then use something like:

.ee_grid_box_v2:nth-child(-n+2) {
    display: none;
}

To always hide the first 2 grid elements.

If you only want that to apply specifically on that home page use the .home class:

.home .ee_grid_box_v2:nth-child(-n+2) {
    display: none;
}


joyandraenton

November 11, 2021 at 10:32 pm

Thanks, that worked.


Tony

  • Support Staff

November 12, 2021 at 9:27 am

You’re most welcome.

Any further questions just let us know.

The support post ‘Grid View Offset 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