Support

Home Forums Event Espresso Premium Using limit in espresso_get_events

Using limit in espresso_get_events

Posted: December 19, 2024 at 10:54 am

Viewing 2 reply threads


wmnf

December 19, 2024 at 10:54 am

The following code was being used in a query in our theme by developers. I found only one event was found. I removed the limit argument and now all the events show. How is limit used, or is it at all? Should I expect all events in the month without the use of limit? I tried finding docs on the function, please send a link to EE function docs if out there somewhere.


$query_events = espresso_get_events( array(
'month' => $queryMonth->format('F Y'),
'show_expired' => true,
'order_by' => 'start_date',
'limit' => -1,
'category_slug' => $args['category']
) );


wmnf

December 19, 2024 at 11:05 am

Another note about this, it was on our staging server running Version 5.0.31.p. The same code exists on our live server running 5.0.21p where all events ARE showing with the limit argument as is. Was there any kind of change that affects this? Want to be sure it is a change I should make.


Tony

  • Support Staff

December 20, 2024 at 10:09 am

Hi there,

I can reproduce this; it’s by sanitizing the arguments passed.

I’ve created a ticket for our developers to investigate this further and see what we can do.

Viewing 2 reply threads

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso