Home › Forums › Calendar Products › Events Calendar PRO › How to filter events by date?
- This topic has 5 replies, 2 voices, and was last updated 6 years, 5 months ago by Ricardo Santos.
-
AuthorPosts
-
October 20, 2017 at 3:29 am #1366370Ricardo SantosParticipant
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 eventsMeanwhile 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.
October 23, 2017 at 4:53 am #1367477AndrasKeymasterHi 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,
AndrasOctober 24, 2017 at 3:26 am #1367946Ricardo SantosParticipantHi András
Thanks a lot.This is the url [I have changed it recently]
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
October 25, 2017 at 5:14 am #1368562AndrasKeymasterHey 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
November 16, 2017 at 8:36 am #1384670Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘How to filter events by date?’ is closed to new replies.