Only Show Todays Events in Widget

Home Forums Calendar Products Events Calendar PRO Only Show Todays Events in Widget

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #10175
    slny311
    Participant

    Hey guys, Im trying to just show the events from today, instead of xx events on the Events List Advanced Widget

    #10197
    Rob
    Member

    Hey there. As it stands, that’s not doable out of the box – you could use the “Next Event” widget to accomplish something similar, but the widget would have to be modified in order to just show today’s events. Sorry I couldn’t offer up more here; if you need more on this let me know.

    #10299
    slny311
    Participant

    Hey Rob,

    I took your advice and dove into the next events widget.

    I found where (pasted below) its being controlled to show how many posts and which category…

    What can i swap out instead of numResults?

    $posts = tribe_get_events( ‘numResults=1&eventCat=’ . $category );

    #10320
    Rob
    Member

    Hey there. Not sure, but our developer would know. I’ve passed this his way and should be able to get you a response by Monday.

    #10345
    slny311
    Participant

    Hey Rob, any luck with this? This is the last blind i got in the project…

    #10359
    Rob
    Member

    Still on this one Steven (we were a bit backlogged with support due to an influx in support issues last week), but yours is in the current batch our dev is looking at so I suspect I’ll have a response by this time tomorrow. Apologies about the delay…

    #10503
    Rob
    Member

    Hey Steven. Talked to our dev about this today. To only show events from today, we’d suggest you pass in startDate and endDate parameters into tribe_get_events with both of them set to today (with this format 2011-10-11). That help?

    #10535
    slny311
    Participant

    Hey Rob can you post sample code for me?

    ?
    $posts = tribe_get_events( ‘startDate=1&endDate=1&eventCat=’ . $category );

    #10548
    Rob
    Member

    Sure. John’s out the rest of this week, but I’ll be able to get you a response on this early next.

    #10687
    slny311
    Participant

    Thanks Rob, looking forward to it…

    #10706
    Rob
    Member

    Yours is in the next batch that we’re currently working through, as a heads up. Answer forthcoming 🙂

    #10786
    John
    Member

    Try this to use today’s date:

    $date = date(‘Y-m-d’);
    $posts = tribe_get_events( “startDate=$date&endDate=$date&eventCat=” . $category );

    #10802
    Rob
    Member

    Thanks John!

    #11499
    slny311
    Participant

    Hey John and Rob, sorry for the delay

    I inputted your code and now its just pulling in the oldest events, heres my code below.

    if( function_exists( ‘tribe_get_events’ ) ) {
    $date = date(‘Y-m-d’);
    $posts = tribe_get_events( “startDate=$date&endDate=$date&eventCat=” . $category );
    $template = TribeEventsTemplates::getTemplateHierarchy(‘widget-featured-display’);
    }

    Any way we can skype or aim this week?

    Thanks!

    #11532
    Rob
    Member

    Hey Steven. I am just getting back to work after having the week off for Thanksgiving, but I can get our developer Jonah to take a look at this for you.

Viewing 15 posts - 1 through 15 (of 18 total)
  • The topic ‘Only Show Todays Events in Widget’ is closed to new replies.