Home › Forums › Calendar Products › Events Calendar PRO › Only Show Todays Events in Widget
- This topic has 17 replies, 5 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
October 26, 2011 at 10:01 am #10175slny311Participant
Hey guys, Im trying to just show the events from today, instead of xx events on the Events List Advanced Widget
October 26, 2011 at 4:24 pm #10197RobMemberHey 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.
October 28, 2011 at 9:43 am #10299slny311ParticipantHey 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 );
October 28, 2011 at 3:39 pm #10320RobMemberHey 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.
October 31, 2011 at 11:36 am #10345slny311ParticipantHey Rob, any luck with this? This is the last blind i got in the project…
October 31, 2011 at 3:24 pm #10359RobMemberStill 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…
November 2, 2011 at 2:51 pm #10503RobMemberHey 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?
November 3, 2011 at 10:58 am #10535slny311ParticipantHey Rob can you post sample code for me?
?
$posts = tribe_get_events( ‘startDate=1&endDate=1&eventCat=’ . $category );November 3, 2011 at 4:12 pm #10548RobMemberSure. John’s out the rest of this week, but I’ll be able to get you a response on this early next.
November 7, 2011 at 9:50 am #10687slny311ParticipantThanks Rob, looking forward to it…
November 7, 2011 at 3:12 pm #10706RobMemberYours is in the next batch that we’re currently working through, as a heads up. Answer forthcoming 🙂
November 9, 2011 at 6:29 am #10786JohnMemberTry this to use today’s date:
$date = date(‘Y-m-d’);
$posts = tribe_get_events( “startDate=$date&endDate=$date&eventCat=” . $category );November 9, 2011 at 10:09 am #10802RobMemberThanks John!
November 27, 2011 at 1:42 pm #11499slny311ParticipantHey 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!
November 30, 2011 at 7:34 am #11532RobMemberHey 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.
-
AuthorPosts
- The topic ‘Only Show Todays Events in Widget’ is closed to new replies.