You can use the CiviEvent widget to add two types of widgets for upcoming public events from CiviCRM. There’s no limit to the number of widgets you can add of either type. You can include the widgets in the sidebar like normal, or you can include them via shortcodes in the body of your posts.
CiviEvent List Widget
This widget is a basic, ﬂexible listing of upcoming events that are marked as public. You have options to customize the appearance and number of events. There is the option to add the event’s city, state, and/or country to the listing if “Show location” is enabled on the event.
Single CiviEvent Widget
This widget displays a single public event from CiviCRM. By default, it will display the ﬁrst event from the current day or the future, or you can set an offset to skip one or more and display the second or third upcoming event. You may display the location if “Show location” is enabled on the event.
Both widgets are available to be inserted into the body of a post using a shortcode. Use the
[civievent_widget] shortcode for the events listing and the
[civievent_single_widget] shortcode for the single next (or offset) event. The available parameters for the shortcodes are as follows:
title="Your Title"The widget title (default: “Upcoming Events” for the list widget, or the event’s title for the single widget).
summary=1Display the event summary. Omit the parameter or set it to 0 to hide the summary. (List widget only.)
limit=5Display the speciﬁed number of events (default: 5). (List widget only.)
alllink=1Display “view all” with a link to the page with a full list of public events. Omit the parameter or set it to 0 to hide the link. (List widget only.)
wtheme="mytheme"The widget theme (a class added to the widget div). Set a new one and handle it in your theme’s CSS. (Default for list widget: “stripe”, with “divider” as an alternative. Default for single widget: “standard”.)
divider=" | "The location ﬁeld delimiter (default: comma followed by a space).
city=1Display the event’s city. Omit the parameter or set it to 0 to hide the city.
state="abbreviate"Display the event’s state/province. Default is “none”, which will display nothing about the state or province. Display options are “abbreviate” for the state/province abbreviation or “full” for the full name.
country=1Display the event’s country. Omit the parameter or set it to 0 to hide the country.
offset=2Skip the given number of events before displaying the next one (default: 0). (Single widget only.)
This plugin requires CiviCRM version 4.3 or higher.
- Fixed bug where shortcode echos content at the top rather than dropping it into place
- Both widgets are now available as shortcodes
- Cleanup for PHP strict notices
- Compatibility for WordPress 4.3
- New single event widget for displaying the next upcoming event
- Offset the single event widget to display the second or third upcoming event
- Suppress repetitive names for city, state, and/or country (e.g. Singapore, Singapore)
- Wrapped all strings in translate functions
- Option to set city, state, country divider
- Option to include city, state, and/or country
- Fixed numbering problem on WordPress plugin directory
- New option for displaying event summary
- Theme adjustments
- Better handling if CiviCRM itself isn’t enabled and installed
Version 0.1 September 27, 2013
- Initial version