The (Govintra) Events widget lists your next few events wherever you place it, most often on the homepage. Each event shows as a card with a date box or a written date, the title, start time and, if you choose, the featured image, location and excerpt. A More events link at the bottom takes staff to the Events page. The widget needs the Events module to be on and events to be published: see Set up the events page.
Add the Events widget
- Go to Appearance, then Widgets.
- Find (Govintra) Events in the list of available widgets and add it to a widget area, such as Homepage second column. See Setup widgets on the homepage.
- Change the settings and select Save.
In the Homepage full-width area the widget shows the events as boxed cards four across at equal height. In every other area it shows them as a stacked list.
Which events the widget shows
Published events whose start date is today or later, in date order, up to the number you set. An event drops off the widget the day after it starts, even if it runs for several days. If there are no upcoming events, the widget shows nothing at all, not even its title, unless Show recent events if none upcoming is ticked.
Widget settings
Title
The heading above the list. The default is “Events”.
Number of events
How many events to show. The default is 5.
Cache (minutes)
How long to keep a ready-made copy of the widget so that busy pages load faster. The default is 0, which means no caching and every page load looks up the events afresh. On an intranet without its own page caching, try 5 or 10. A new or changed event can take up to that many minutes to appear.
Calendar date format
Unticked by default. Tick it to show each event’s date as a small calendar box in the brand colour, with the day of the week, the day number and the month, and the start time next to the title. Untick it to show the date as a line of text instead, in the format set under Date format.
Show featured image
Unticked by default. Tick it to show each event’s featured image above its details. Events without a featured image show text only.
Show excerpt
Unticked by default. Tick it to show the first 15 words of each event’s excerpt.
Show location
Unticked by default. Tick it to show the event’s Location and, for online events, an Online meeting link that opens the meeting in a new tab.
Show recent events if none upcoming
Unticked by default. Tick it so that, when nothing is coming up, the widget shows the most recent past events instead of disappearing. Useful on a site with only a few events a year.
Event types
A list of tick boxes, one for each event type. Leave them all unticked to show every event. Tick one or more to show only events of those types, for example a widget on the learning and development page that shows only training events. See Manage event types.
Date format
Used when Calendar date format is unticked. The default, g.ia D jS, shows dates like “9.30am Mon 6th”. Leave it empty to use the date format from Settings, General; one-day events then get the start time added after the date. Any PHP date code works, for example “l j F, g.ia” for “Monday 6 October, 9.30am”. Events that run over several days show the start and end, each in this format.
What else appears on each card
Every card shows the title as a link and, when the calendar box is on, the start time. Cards also show the number of comments the event has and, if likes are switched on for events, the number of likes. The More events link at the bottom of the widget goes to the page chosen as Events page under Options, Modules, Events. If no page is chosen, there is no link.
Sites using The Events Calendar plugin
If your intranet uses The Events Calendar plugin instead of the built-in Events module, use the (Govintra) Events Calendar widget. It has the same settings, with Event categories in place of Event types and the date format typed directly into the widget, and it reads the plugin’s events. It only works while that plugin is active.
To create events, see Add or edit an event. For the other widgets, see Available widgets.
