Home › Forums › Calendar Products › Events Calendar PRO › events-list-load-widget-display
- This topic has 3 replies, 3 voices, and was last updated 11 years, 2 months ago by Barry.
-
AuthorPosts
-
February 28, 2013 at 10:13 am #41255CliffParticipant
I know how to upload a php file to override. I’ve made a folder called “events” in my template folder.
I don’t write php. Can someone help with changing the widget to simply display all events for “Today” please? Whether it’s 0, 1, or 12 events on the calendar for Today I’d love the widget to display them. I don’t want “Next 3 events”, etc… just everything for today whether it’s o or 12 events, display everything.
Would be eternally grateful.
March 1, 2013 at 2:24 pm #41364BernhardParticipantSame here! I just want to display ALL today’s events in the widget, doesn’t matter if it is 0 or 20.
What I’ve done is taking the file ‘events-advanced-list-load-widget-display.php’ from ‘events-calendar-pro/views’. Then I tried to follow this topic https://theeventscalendar.com/support/forums/topic/only-show-todays-events-in-widget, so I addedif( function_exists( ‘tribe_get_events’ ) ) {
$date = date(‘Y-m-d’);
$posts = tribe_get_events( “start_date=$date&end_date=$date&eventCat=” . $category );
$template = TribeEventsTemplates::getTemplateHierarchy(‘widget-featured-display’);
}to different positions (of course only one position per try) into this file and uploaded it to ‘wp-content/themes/my-theme/events/’
but the only thing I got is the widget-title, nothing more.Is the code correct?
To which line-number or between which lines should this code go to?March 2, 2013 at 7:28 am #41398CliffParticipantThe widget also doesn’t observe Multiday Event Cutoff (Events | Settings | General). For instance, if an event yesterday starts at 10pm and ends at 1am today, the widget still displays it even though the Multiday Event Cutoff is set to 2am. The calendar displays the Multiday Event Cutoff properly but the widget doesn’t.
Looking at the link that Bernhard posted above it’s evident that this widget has rec’d zero attention in over a year. Probably longer.
March 5, 2013 at 7:58 am #41603BarryMemberDisplaying only today’s events is not what that widget is really set up to do. Rather than hack away at it, it is probably cleaner to create a brand new widget that does what you want.
This code is based on a random events widget Jonah put together and should broadly meet your needs (you can set it up as a plugin if you know how, or else paste it into your theme’s functions.php file).
I hope that helps – it may at least form a starting point for your own solution 🙂
-
AuthorPosts
- The topic ‘events-list-load-widget-display’ is closed to new replies.