Home › Forums › Calendar Products › Events Calendar PRO › List Today’s Events
- This topic has 11 replies, 2 voices, and was last updated 8 years, 3 months ago by
bartmarkten.
-
AuthorPosts
-
December 11, 2017 at 6:34 am #1402803
bartmarkten
ParticipantHello ,
I have gone through support forum’s regarding this topic but I am not getting 100% answer for this topic.
I just wanted to list Today’s event in all possible scenarios which are:
1) For simple event – like start date of which is as an ex. 11-12-2017 and end date is also 11-12-2017
2) For event on multiple days – like start date of which is 10-12-2017 and end date of which is 12-12-2017
3) For recurring event – like start date of event is 11-12-2017 and it is a recurring event like for each day or week.
Please guide me over this ,
Thanks.
December 12, 2017 at 4:51 am #1403506bartmarkten
ParticipantCan you please Reply on this?
December 12, 2017 at 11:32 am #1403963Jennifer
KeymasterHello,
Thanks for reaching out! I’d be happy to help you out with this. Please note that per our forum guidelines, it can take 24-48 hours for a response (usually only when thread volume is particularly high), although we always try to respond much sooner than that when possible!
I think your best bet for this may be the shortcodes that come with Pro: [tribe_events view=”day”]. This would show the events for today in each of the scenarios that you mentioned (see screenshot). Can you give this a try and see if it will work for you? If this doesn’t meet your needs, please let me know. I’ll be happy to see what else I can recommend!
Thanks,
Jennifer
December 12, 2017 at 10:39 pm #1404316bartmarkten
ParticipantHello ,
Yes i see this short-code works as per my requirement , But actually i want to display events in totally different design then this , is it possible that i only get data from some filter etc. and then i can display those data as per my required format.
December 13, 2017 at 2:44 am #1404417Jennifer
KeymasterSure thing! You could use the tribe_get_events function to pull in the events and then display their information in any format you like. You could also customize the template for day view. If you’d like to go this route, our themer’s guide has instructions on customizing our templates, and you can find this one at wp-content/plugins/the-events-calendar/src/views/day.php.
If you get stuck with the code or have any questions, please let me know! I’ll be happy to point you in the right direction.
Thanks,
Jennifer
December 14, 2017 at 11:02 pm #1406178bartmarkten
ParticipantHello ,
I used following code :
$todays_events = tribe_get_events( array(
‘posts_per_page’ => -1,
‘start_date’ => date( ‘Y-m-d H:i:s’ )
) );Yes this provides me today’s events in all scenarios but this also includes all future events as well.
like if we have an event like from 27-jan to 30-jan then above function also include this event.
So , now we need remove this type of events , please guide me for this.Thanks.
December 15, 2017 at 6:13 am #1406335Jennifer
KeymasterHello,
Can you try setting ‘end_date’ as well?
'end_date' => date( 'Y-m-d H:i:s' )This should set the end of the date range to today, so that future events are not included.
Let me know if that works!
Thanks,
Jennifer
December 17, 2017 at 9:59 pm #1407543bartmarkten
Participantokay I now used following function as you say :
$todays_events = tribe_get_events( array(
‘posts_per_page’ => -1,
‘start_date’ => date( ‘Y-m-d H:i:s’ ),
‘end_date’ => date( ‘Y-m-d H:i:s’ )
) );It does not includes recurring events now , like if i have set any event like 15th Dec and which will be everyday until 27th Dec , then it is not getting listed using above function.
Let me know , what should use now?
Thanks.
December 19, 2017 at 11:35 pm #1409458bartmarkten
ParticipantHello ,
Is anyone there to reply please ?
January 1, 2018 at 3:29 pm #1415725Jennifer
KeymasterSorry for the delayed response here, I hope you enjoyed the holidays!
I tried the code you’re using on my end, and I am seeing both single events and recurring events for the current day. Can you send me a link to a screenshot of the recurrence settings for a recurring event that isn’t working? I’ll test it out and see if I can find the issue.
I do want to point out that the event will not display if the end time for the event has passed for that day. So as a test, I would recommend creating a recurring event that ends at 11:59pm to see if this might be the reason the recurring event wasn’t showing up before.
January 23, 2018 at 8:38 am #1433622Support Droid
KeymasterHey 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 ‘List Today’s Events’ is closed to new replies.
