• Hello,
    In the events list, it is currently possible to show events for the current month, current and next etc…
    Could it be added a filter to display events of the PREVIOUS month (or previous & current)?
    I duplicate a great number of events (which are not recurring) and every 1st of the month I’m dreaming of a way to display last month’s events instead of fetching the entire list of past events.
    Thanks a lot for your support!
    Regards,
    Thierry

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    did you already tried events list group under Events > Settings > Formatting > Events > Events page grouping ?

    Thread Starter Palijn

    (@palijn)

    Sorry I was unclear. I am talking of the event list in the admin page from the wp-admin section. I suppose the formatting you suggest only applies to the front-end ?

    Plugin Support angelo_nwl

    (@angelo_nwl)

    I see what you mean now, you can create custom scope to handle previous month using this tutorial – https://wp-events-plugin.com/tutorials/create-your-own-event-scope/

    Thread Starter Palijn

    (@palijn)

    Hello @angelo_nwl ,
    I tried but did not manage to get a new scope working.
    To be sure, I copy-pasted the code from the tutorial, and it does not filter anything either.
    When selecting the “Today and tomorrow” filter, all events are displayed.

    From the debugging I was able to do (but is it worth anything?) , it seems that the my_em_scope_conditions() function is called, but that the $args[‘scope’] value is ALWAYS “all”.

    I would be glad if you could help ! Thanks in advance !

    Plugin Support angelo_nwl

    (@angelo_nwl)

    the above snippet is just to help you get started and might not work out of the box however did you used or paste the snippet em_events_build_sql_conditions and em_get_scopes at the end of your theme functions.php ?

    Thread Starter Palijn

    (@palijn)

    yes sure, I pasted the code in my themes’s functions.php. The functions are really called. But they don’t do anything because the if() block never gets executed, as the string never matches, because every time it is called, the $args[‘scope’] string value is “all” .
    The if() in question is :
    if( !empty($args['scope']) && $args['scope']=='today-tomorrow' )

    Sincerely I have no idea what should be changed for your code to work, so any guidance will be highly appreciated.

    Thread Starter Palijn

    (@palijn)

    Hello,
    I tried, but have not been able to add a new filter to the events list.
    It would really really help me in managing events, because my workflow involves duplicating a lot of _past_ events, which are not displayed in the list unless I choose to display _all_ events… and then I have to navigate through pages. It works, but it’s a pain.
    Any help would be really appreciated, because as reported above, the code snippet does not work as is, nor does it help me understand what I should actually code.
    Anyone, please? ??
    Thank you for your time,
    Best regards
    Thierry

    Plugin Support angelo_nwl

    (@angelo_nwl)

    sorry but at the moment we are quite limited with regards to custom coding; the snippet we shared is just to give you a good start and might not work out of the box.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Event list : filter for PREVIOUS month events’ is closed to new replies.