How to filter events by date?

Home Forums Calendar Products Events Calendar PRO How to filter events by date?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1366370
    Ricardo Santos
    Participant

    Hi
    I would like to list past events, but only the ones in the recent past. Lets say, in the last month.

    I am using this short-cut with is very useful:

    [tribe_events view=”photo” tribe-bar=”false” date=”2017-09-01″]

    but then, it shows me also the upcoming events.
    I would like to have start_date=”XXX” and end_date=”XXX” parameters to filter the events

    Meanwhile we don’t have those parameter, can you help me filtering out events that are not in the past?
    I think that a solution could be adding a filter function in funtions.php, which retrieves only past events.
    Do you have any code doing this?

    Thanks in advance.

    #1367477
    Andras
    Keymaster

    Hi Ricardo,

    Thanks for using our plugins and welcome to the forums!

    I can try to help you with your question.

    Please note, that we are limited in supporting and doing customizations. I will ask the team if someone can help out with this but it can take a couple of days, as we are a bit overloaded at the moment.

    Thanks for your patience! We’ll get back to you soon.

    Cheers,
    Andras

    #1367946
    Ricardo Santos
    Participant

    Hi András
    Thanks a lot.

    This is the url [I have changed it recently]

    All Events

    in “«Previous Events” I would like to show the most recent ones and not an endless list.
    Like the last 10, or the ones in last 30 days.

    I am not in hurry, but I would like to have this feature.

    Regards

    #1368562
    Andras
    Keymaster

    Hey Ricardo,

    Regarding your first post:

    You can try to use the tribe_events_pro_tribe_events_shortcode_pre_render action, you should be able to manually add some stuff to query.

    In this article you will find some info on what you can pass to the query.

    You can maybe also use the shortcode_atts filter as well.

    (Here you can find a full list of our functions.)

    in “«Previous Events” I would like to show the most recent ones and not an endless list.
    Like the last 10, or the ones in last 30 days.

    I checked your URL, now it shows me 6 events on the “Previous events” page.

    If I’m not mistaken the number of events shown there is influenced by the setting under Events > Settings >  General tab > Number of events to show per page.

    Hope this helps you get started.

    Andras

    #1384670
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How to filter events by date?’ is closed to new replies.