• Resolved the_sniper

    (@the_sniper)


    I am looking how to display past events and events on a particular date.
    I have gone through the EM_Events.php and EM_Event.php classes but I can’t really know how to modify this code to suit my needs.
    The simplest way I have done is to add another piece of function (output_grouped_past($args)) in which I may retrieve past data from the database and display like from the view
    EM_Events::output_grouped_past().
    How can I perform this ? Please.
    Did somebody do it in the past or have this already been shown in this forum?

    Thanks

    https://ww.wp.xz.cn/plugins/events-manager/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter the_sniper

    (@the_sniper)

    I found the solution by using this short code:
    EM_Events::output(array('scope'=>'past', 'limit'=>10, 'pagination'=>1))

    Hey Sniper,

    could you describe, where you put the code inside. I had the same problem with the old events. They are still in the DB but not shown on the Events-Page.

    Thanks

    Thread Starter the_sniper

    (@the_sniper)

    @dirtyharry30,

    Edit the events-list-grouped.php file under the /wp-content/plugins/events-manager/templates/templates/. Copy and paste this echo EM_Events::output(array('scope'=>'past', 'limit'=>10, 'pagination'=>1)); at the end of the file before the tag ‘?>‘, save it and enjoy

    Thread Starter the_sniper

    (@the_sniper)

    Note that you can display the past events where you want in the view. Either before or after the current/future events.

    Hope this helps

    Yeah, it’s working.

    Great, thank you 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Display Past events’ is closed to new replies.