Using EM_Events::output twice on same page
-
I have a template where I’m returning a featured event at the top of the page using
echo EM_Events::output( array('limit'=>1,'orderby'=>'start_date','category'=>5,'format'=>'etc') );
and then below that, the next event by date:
echo EM_Events::output( array('limit'=>1,'orderby'=>'start_date','format'=>'etc') );
Scenario: Event A occurs on 1/5, and is in category 5. Event B occurrs on 1/6 and is not in category 5. On 1/4, Event A shows up at the top of the page as expected; however Event B shows up in the second list. Expected result is that Event A appears in both places since it meets the critera of each EM_Events query. It is the next event by start_date in both cases.
It looks like EM_Events the second time isn’t running a fresh query. Is there something I can do to reset that before running the second query?
- The topic ‘Using EM_Events::output twice on same page’ is closed to new replies.