List Today’s Events

Home Forums Calendar Products Events Calendar PRO List Today’s Events

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1402803
    bartmarkten
    Participant

    Hello ,

    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.

    #1403506
    bartmarkten
    Participant

    Can you please Reply on this?

    #1403963
    Jennifer
    Keymaster

    Hello,

    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

    #1404316
    bartmarkten
    Participant

    Hello ,

    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.

    #1404417
    Jennifer
    Keymaster

    Sure 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

    #1406178
    bartmarkten
    Participant

    Hello ,

    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.

    #1406335
    Jennifer
    Keymaster

    Hello,

    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

    #1407543
    bartmarkten
    Participant

    okay 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.

    #1409458
    bartmarkten
    Participant

    Hello ,

    Is anyone there to reply please ?

    #1415725
    Jennifer
    Keymaster

    Sorry 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.

    #1433622
    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 11 posts - 1 through 11 (of 11 total)
  • The topic ‘List Today’s Events’ is closed to new replies.