Simple Hack for Events Calendar Sidebar Widget
-
I’ve seen a lot of posts about issues with the Events Calendar Sidebar Widget. One of the issues is the sidebar widget will display “Events are coming soon, stay tuned!” The following hack will work if you are trying to display a calendar NOT an event list in the widget. I’m able to get the calendar to display although it doesn’t fit in the widget box (in my theme at least) and the title does not show up. It’s good enough for me for now, but it looks like a few more tweaks could clean it up.
I’m using WP 2.9 and Events Calendar 6.5.2.1. Here’s the hack. Again use only if you want the calendar, not the list.
Edit the file ec_widget.class.php (after making a backup) and change:
function display($args) {
$js = new EC_JS();
extract($args);
echo $before_widget;
$options = get_option(‘widgetEventsCalendar’);
if(isset($options[‘title’]) && !empty($options[‘title’]))
echo $before_title . $options[‘title’] . $after_title;
if($options[‘type’] == ‘calendar’)
$this->calendar->displayWidget($this->year, $this->month);
else
$this->calendar->displayEventList($options[‘listCount’]);
echo $after_widget;
}to
function display($args) {
$js = new EC_JS();
extract($args);
echo $before_widget;
$options = get_option(‘widgetEventsCalendar’);
if(isset($options[‘title’]) && !empty($options[‘title’]))
echo $before_title . $options[‘title’] . $after_title;
$this->calendar->displayWidget($this->year, $this->month);
echo $after_widget;
}The changes is simply removing a check to see if the widget options are set for “calendar” or “list” and assuming it is calendar.
It’s too bad the plugin developers have essentially gone silent for six months. Walking away from an open source project without saying that you’re walking away is never a good idea.
</rant>
- The topic ‘Simple Hack for Events Calendar Sidebar Widget’ is closed to new replies.